Skip to content

OAuth2 Token Endpoint

POST
/oauth2/token

Exchange an authorization code for tokens, or refresh an existing token. Supports grant_type authorization_code and refresh_token.

Token request parameters (RFC 6749 Section 4.1.3).

object
grant_type
required
string
Allowed values: authorization_code refresh_token
code
string
nullable
redirect_uri
string
nullable
client_id
string
nullable
client_secret
string
nullable
code_verifier
string
nullable
refresh_token
string
nullable
resource
string
nullable

Token response

object
access_token
required
string
token_type
required
string
expires_in
required
integer
refresh_token
string
id_token
string
scope
string
Cache-Control
required
string
Pragma
required
string

OAuth2 error response

object
error
required

OAuth2 error code

string
error_description

Human-readable error description

string