The token endpoint can be used by the client to obtain an access token by exchanging its refresh token. Note that authentication requirements to this endpoint are configured by the application’s tokenEndpointAuthMethod property. For refresh_token grants, the application calls the POST /{{envID}}/as/token endpoint to exchange the refresh token for an access token.

For a refresh_token grant type in which the application’s tokenEndpointAuthMethod is set to NONE, the request requires the client_id property value and does not require an Authorization header.

Supported parameters for the token request are:

Property Description
client_id A string that specifies the application’s UUID.
refresh_token A string that specifies refresh token. This property is required only if the grant_type is set to refresh_token.
grant_type A string that specifies the refresh_token grant type for the token request.

To obtain a refresh token along with an access token, the client must be configured with the refresh_token grant type and the authorization_code grant type. With this configuration, a refresh token is generated along with the access token. When obtaining the original access token, a refresh token is included in the response, which is tied to the client and the user session. As long as the session exists and it is not expired (30 days since the last sign on), the /{{envID}}/as/token endpoint can be used to exchange the refresh token for a new access token and refresh token. If the openid scope is granted, an ID token is also included.

When a new refresh token is issued, the previous refresh token is rotated to prevent token abuse, which is useful when client authentication is disabled. In addition, when a refresh token is exchanged, the activeAt property of the corresponding session is updated. This does not extend the duration of the session, but can be used to indicate that there is activity.

To revoke a refresh token, the corresponding session must be deleted. Session termination is supported only by the resource owner using the /{{envID}}/as/signoff endpoint or by disabling the user.

For more information about access token claims, see Access token claims.