Exchange Token

Exchange an authorization code for access and refresh tokens, or refresh an expired access token.

Authorization code exchange: Send grant_type=authorization_code with the code from the authorize redirect,
along with redirect_uri, client_id, and code_verifier (if PKCE was used).

Token refresh: Send grant_type=refresh_token with the refresh_token and client_id.
The old token is revoked and new tokens are issued.

Access tokens expire after 1 hour. Refresh tokens expire after 30 days.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params

Token request

string
required

The grant type: authorization_code or refresh_token

string

Authorization code (required for grant_type=authorization_code)

string

Must match the redirect_uri used in the authorize request (required for grant_type=authorization_code)

string
required

The client_id from registration

string

Client secret (required for confidential clients only)

string

PKCE code verifier (required if code_challenge was used during authorization)

string

Refresh token (required for grant_type=refresh_token)

Responses

Language
Credentials
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json