Generate a token
Generate a token for usage with authenticating via OAuth2 in subsequent API calls.
Supports the following grant types:
client_credentials— exchange client ID and secret for an access token.authorization_code— exchange an authorization code (from the OAuth2 authorize flow) for an access token and refresh token. Requirescode,redirect_uri, and optionallycode_verifier(for PKCE) andstate.refresh_token— exchange a refresh token for a new access token and refresh token.
Note: This endpoint is available at the absolute URL /oauth/token (not relative to the versioned API base path).
Request
Authorization code received from the authorize endpoint. Required when grant_type is authorization_code.
PKCE code verifier. Required when grant_type is authorization_code and a code_challenge was sent in the authorization request.
Redirect URI that was used in the authorization request. Required when grant_type is authorization_code.
Refresh token to exchange for a new access token. Required when grant_type is refresh_token.
Optional state parameter for the authorization_code grant type.
Response
Refresh token. Returned when grant_type is authorization_code or refresh_token.
Number of seconds that the refresh token is valid for. Returned when a refresh_token is included in the response.