Skip to main content
POST
Exchange tokens

Body

application/x-www-form-urlencoded

Token request (from POST body, application/x-www-form-urlencoded)

grant_type
string
required

Grant type: "authorization_code" or "refresh_token"

client_id
string | null

Client ID (if not using HTTP Basic auth)

client_secret
string | null

Client secret (if not using HTTP Basic auth)

code
string | null

Authorization code (for authorization_code grant)

code_verifier
string | null

PKCE code verifier (for authorization_code grant with PKCE)

redirect_uri
string | null

Redirect URI (for authorization_code grant, must match the one used in /authorize)

refresh_token
string | null

Refresh token (for refresh_token grant)

Response

Token response

Token response as per OAuth 2.0 spec

access_token
string
required
expires_in
integer<int64>
required
token_type
string
required
refresh_token
string | null
scope
string | null