Skip to main content
POST
cURL
SDK equivalent
Exchange an authorization code for tokens or refresh existing sessions. Populate the body with either:
  • grant_type=authorization_code, code, redirect_uri, code_verifier
  • grant_type=refresh_token, refresh_token
Tokens inherit the scopes approved in the /oauth/authorize step. Use the companion POST /oauth/revoke operation to invalidate a refresh or access token when a user withdraws consent.

Body

application/json
grant_type
any
required
code
string
required
redirect_uri
string
required
client_id
string
required
code_verifier
string
required

Response

200 - application/json
access_token
string
required
token_type
any
required
expires_in
number
required
scope
string
required
granted_scopes
string[]
required
authorization_id
string
required
app_scoped_user_id
string
required
issued_at
string
refresh_token
string
refresh_token_expires_in
number
refresh_issued_at
string
id_token
string