Getting Access Token
Description
This endpoint is used to obtain a token for authentication.
POST {BaseURL}/api/v1/auth/token
Content-Type: application/json
Authorization: Basic base64encode({clientId:clientSecret})
{
"refresh_token": "{refreshToken}"
}
Method
POST
Headers
- Content-Type:
application/json
- Authorization:
Basic base64encode({clientId:clientSecret})
- The
clientId:clientSecret
should be base64 encoded.
- The
Request Parameters
Parameter | Description | Required |
---|---|---|
refresh_token | Refresh token is given when first connected and can be used to renew access token here. | Yes |
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 |
---|---|
message | Description of the error |
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).