Access Token

Make a call to this endpoint to exchange a temporary authorization code for an access token.

post/authorization-codes/tokens

Request

  • Base URL
    https://api.attentivemobile.com/v1
  • Auth
    HTTP bearer

Request body application/x-www-form-urlencoded

grant_typestring

Type of grant. Currently, authorization_code is the only accepted type.

codestring

Authorization code provided after the user authorizes the scopes during the application install process.

redirect_uristring

The same redirect URI that was used when requesting the authorization code.

client_idstring

The application’s client ID which can be found on the Manage Distribution tab for the application.

client_secretstring

The application’s client secret which can be found on the Manage Distribution tab for the application.

Example request

{
  "grant_type": "authorization_code",
  "code": "MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3",
  "redirect_uri": "https://test.com",
  "client_id": "9f7a2f11a4f849f59268869ec766111c",
  "client_secret": "0FvaRpPi5KBC4Izj9ALA0AG8J2WdcBhU"
}

Response

Token generated

access_tokenstring

a provisioned token associated with the company application

id_tokenstring

a provisioned id token associated with the company application

token_typestring

a type of the token

expires_ininteger

expiration time for the token in seconds

Example response

{
  "access_token": "riSm9jz2Tq2XKO8ZqS1+CJg8tOJ8cALn19zRlQc9s1",
  "id_token": "riSm9jz2Tq2XKO8ZqS1+CJg8tOJ8cALn19zRlQc9s1",
  "token_type": "Bearer",
  "expires_in": 900
}

Changes