Obtain device token
Use this endpoint to acquire a device token. Endpoint is available at /token
relative path.
Parameters:
client_id
: unique client IDclient_secret
: API keygrant_type
: device_codedevice_code
: the device code acquired via registration call
Return value:
The Error
object if error occurred, otherwise Token
JSON object which has the following structure:
CODE
{
"token_type": "Bearer",
"expires_in": NNN,
"access_token": "xxx",
"refresh_token": "yyy"
}
- token_type – Always “Bearer”.
- expires_in – Access token expiration time in seconds.
- access_token – An access token that you must provide in the call to the public API login function.
- refresh_token – The token used to refresh the device token.
If
authorization_pending
error is returned, the client should keep polling the endpoint until the token is acquired or some other error is returned.