Exchange authorization code or refresh token

Supports two grant types:

  • authorization_code: exchange an auth code for access + refresh tokens
  • refresh_token: obtain a new token pair using a refresh token

Access tokens are valid for 24 hours. Refresh tokens are valid for 30 days.
This endpoint requires no authentication header — credentials are passed in the body.

Public clients (PKCE): Pass code_verifier instead of client_secret when
exchanging an authorization code. For refresh, omit client_secret.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
string
enum
required
Allowed:
string
required

Authorization code received from the authorize endpoint

string
required
string

Required for confidential clients. Omit for public clients using PKCE.

uri
required

Must match the redirect_uri used in the authorize request

string

PKCE code verifier (the original random string used to generate the code_challenge).
Required when code_challenge was provided in the authorize request.

Responses

400

Invalid grant, expired code, or bad request

401

Invalid client credentials

429

Rate limit exceeded

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