OAuth2 success response
If you are authorized by the server, the API returns a JSON dictionary containing the following keys:
| Key | Description | Type |
|---|---|---|
| access_token | Temporary token used to call the service. | STRING |
| token_type | Bearer: authorized token type. |
STRING |
| expires_in | Token validity period, in seconds. | STRING |
| refresh_token | Token used to extend your session. | STRING |
Example:
{
"access_token": "TK948869a6f873adb622enhoaGeVY2iRaptqlmpplGeWZA",
"token_type": "Bearer",
"expires_in": "300",
"refresh_token": "*TK9bdd05f8e9d3c905834bdeqaUlGFll2iRaplll29mZmtkZQ"
}
OAuth2 error responses
| Error type | Request example | Response type |
|---|---|---|
Missing client_id parameter |
https://{SERVER_ADDRESS}/oauth/access_token/?client_secret=abcd&scope=client_address |
400 Error (Invalid Request) |
Empty client_id parameter |
https://{SERVER_ADDRESS}/oauth/access_token/?client_secret=abcd&scope=client_address&client_id= |
400 Error (Invalid Request) |
Incorrect client_id (expired, out of scope, or nonexistent) |
https://{SERVER_ADDRESS}/oauth/access_token/?client_secret=abcd&scope=client_address&client_id={INCORRECT_LICENCE_CODE} |
400 Error (Invalid Client) |
client_id does not authorize the requested scope |
https://{SERVER_ADDRESS}/oauth/access_token/?client_secret=abcd&scope=client_address&client_id={LICENCE_CODE_NOT_AUTHORIZED} |
400 Error (Unauthorized Client) |
Unknown scope parameter value |
https://{SERVER_ADDRESS}/oauth/access_token/?client_secret=abcd&scope=client&client_id={LICENCE_CODE} |
400 Error (Unsupported Grant Type) |
Missing or empty client_secret parameter |
https://{SERVER_ADDRESS}/oauth/access_token/?scope=client_address&client_id={LICENCE_CODE}https://{SERVER_ADDRESS}/oauth/access_token/?client_secret=&scope=client_address&client_id={LICENCE_CODE} |
400 Error (Invalid Request) |
Missing or empty scope parameter |
https://{SERVER_ADDRESS}/oauth/access_token/?client_secret=abcd&client_id={LICENCE_CODE}https://{SERVER_ADDRESS}/oauth/access_token/?client_secret=abcd&scope=&client_id={LICENCE_CODE} |
400 Error (Invalid Request) |
| Parameter typo | https://{SERVER_ADDRESS}/oauth/access_token/?client_scret=abcd&scope=client_address&client_id={LICENCE_CODE} |
500 Error |
Related to