Skip to main content

OAuth Token Object

Token returned by the OAuth token endpoint.

token_typestringrequired

Type of the token. Always Bearer.

Example: Bearer
expires_ininteger<int32>required

Seconds until the access token expires.

Example: 4
access_tokenstringrequired

The access token, sent as Authorization: Bearer <access_token> on subsequent requests.

Example: eyJ0eXAiOiXKV1QibCJhbLciOiJeiUzI1.....
refresh_tokenstring

Refresh token, returned only by the authorization_code and refresh_token grants. Exchange it at POST oauth/token with grant_type=refresh_token for a fresh access token.

Example: eyJ0eXAiOiXKV1QibCJhbLciOiJeiUzI1.....
scopes objectrequired

Scopes granted to the access token. Returned as a comma-delimited string for the client_credentials grant and as an array of strings for the other grants.

oneOf
string
Example: read,write
metadata object

Client metadata attached to the token, keyed by scope. Returned by the client_credentials and authorization_code grants.

property name*any

Client metadata attached to the token, keyed by scope. Returned by the client_credentials and authorization_code grants.

OAuth Token Object
{
"token_type": "Bearer",
"expires_in": 4,
"access_token": "eyJ0eXAiOiXKV1QibCJhbLciOiJeiUzI1.....",
"refresh_token": "eyJ0eXAiOiXKV1QibCJhbLciOiJeiUzI1.....",
"scopes": "read,write",
"metadata": {}
}