To obtain an access token, send a POST request with content type application/x-www-form-urlencoded to the endpoint:
https://api.tpay.com/oauth/auth
Check the details in the API Reference documentation: POST /oauth/auth
In the request, specify the following parameters:
client_id * | Client identifier. |
client_secret * | Client secret. |
* Fields required.
You can generate these parameters in the Merchant Panel.
To create an authorization token, send a POST request to the endpoint:
https://api.tpay.com/oauth/auth
Check the details in the API Reference documentation: POST /oauth/auth
In the request, specify the following parameters:
client_id * | Client identifier. |
client_secret * | Client secret. |
* Fields required.
Example:
Example response:
Response parameters:
issued_at * | The timestamp (in Unix format) indicating when the token was generated. This value represents the number of seconds since January 1, 1970 (UTC). |
scope * | The scope of permissions granted to the token. In this case, the token allows for data reading (read). |
token_type * | The type of token used for authorization. A Bearer token means that the application can access resources by passing this token in the HTTP Authorization header. |
expires_in * | The token's validity period in seconds. In this case, the token will expire after 7200 seconds (2 hours) from its generation. |
access_token * | The access token used for authorization. This token must be passed in the HTTP Authorization header in the format: Bearer <access_token>. |
* Fields that always appear in the response body.