{https://yourApp/callback}
.Authorize user
Request tokens
code
) from the previous step, you will need to POST
to the token URL.Parameter Name | Description |
---|---|
grant_type | Set this to authorization_code . |
code | The authorization_code retrieved in the previous step of this tutorial. |
client_id | Your application’s Client ID. You can find this value in your Application Settings. |
client_secret | Your application’s Client Secret. You can find this value in your Application Settings. To learn more about available application authentication methods, read Application Credentials. |
redirect_uri | The valid callback URL set in your Application settings. This must exactly match the redirect_uri passed to the authorization URL in the previous step of this tutorial. Note that this must be URL encoded. |
HTTP 200
response with a payload containing access_token
, refresh_token
, id_token
, and token_type
values:refresh_token
will only be present in the response if you included the offline_access
scope and enabled Allow Offline Access for your API in the Dashboard.Make an API call
Exchange refresh token
offline_access
scope when you initiated the authentication request through the authorize endpoint.POST
request to the /oauth/token
endpoint in the Authentication API, using grant_type=refresh_token
.Parameter Name | Description |
---|---|
grant_type | Set this to refresh_token . |
client_id | Your application’s Client ID. You can find this value in your Application Settings. |
refresh_token | The refresh token to use. |
scope | (optional) A space-delimited list of requested scope permissions. If not sent, the original scopes will be used; otherwise you can request a reduced set of scopes. Note that this must be URL encoded. |
HTTP 200
response with a payload containing a new access_token
, its lifetime in seconds (expires_in
), granted scope
values, and token_type
. If the scope of the initial token included openid
, then the response will also include a new id_token
: