The OAuth 2.0 access token response is returned by RapidIdentity from the token endpoint after a successful access token request. The response contains the access token and, when applicable, a refresh token.
Response Fields
| Field | Recommendation | Description |
|---|---|---|
access_token | Required | The access token issued by RapidIdentity. |
token_type | Required | The type of token issued. RapidIdentity always returns
Bearer. |
expires_in | Recommended | The lifetime in seconds of the access token. |
refresh_token | Optional | The token used to obtain a new access token. This is returned only when the client is configured to receive refresh tokens. |
scope | Optional | The scopes granted by the user. This is required if the granted scope differs from the scope requested. |
Example Response
HTTP/1.1 200 OK
Content-Type: application/json
Cache-Control: no-store
{
"access_token": "2YotnFZFEjr1zCsicMWpAA",
"token_type": "Bearer",
"expires_in": 3600,
"refresh_token": "tGzv3JOkF0XG5Qx2TlKWIA",
"scope": "read"
}
Error Response
If the access token request fails, RapidIdentity returns an error response with the following fields:
| Field | Description |
|---|---|
error | Common values are
invalid_request,
invalid_client,
invalid_grant,
unauthorized_client,
unsupported_grant_type, and
invalid_scope. |
error_description | A human-readable description of the error. |
error_uri | A URI to a page describing the error. |