Getting Access Toking
Description
This endpoint is used to obtain a token for authentication.
POST {BaseURL}/api/v1/auth/token
Content-Type: application/json
Authorization: Basic {encodedClientId:clientSecret}
{
"refresh_token": "{refreshToken}"
}
Headers
- Content-Type:
application/json
- Authorization: Basic Auth
clientId:clientSecret
- The
clientId
andclientSecret
should be base64 encoded.
- The
Success Response
http status code: 200
Key | Definition |
---|---|
token | The obtained authentication token. |
token_type | The type of the token, usually "Bearer". |
expire_in | The duration in seconds for which the token is valid. After this period, the token expires and a new one must be obtained. |
Error Response
http status code: 401
Key | Definition |
---|---|
error | The error code indicating an invalid client. |
error_description | Description of the error, typically "Invalid client credentials" when client is unauthorized. |
Notes
- The token received in the 200 response should be used as a Bearer token for subsequent requests requiring authentication.
- Tokens expire after 900 seconds (15 minutes).