Exchanges authorization codes for access and refresh tokens, or uses refresh tokens to obtain new access tokens. This endpoint supports multiple OAuth2 grant types including authorization_code and refresh_token flows.
Use Case: Obtain API access tokens after user authorization or refresh expired tokens to maintain continuous API access for applications.
OAuth2 client identifier
OAuth2 grant type. Both 'authorization_code' and 'code' are accepted (authorization_code is normalized to code internally)
authorization_code, code, refresh_token Client secret (required for confidential clients and refresh_token grant)
Authorization code from /v1/oauth2/authorize/confirm (required for authorization_code grant)
PKCE code verifier (required for PKCE flow, replaces client_secret)
Redirect URI (required for authorization_code grant, must match authorization request)
Refresh token (required for refresh_token grant)
Tokens generated successfully
Bearer token for API authentication
Access token expiration time in seconds (typically 3600 = 1 hour)
Token type (always Bearer)
Bearer Token to refresh the access token
Refresh token expiration time in seconds (typically 2592000 = 30 days)
Space-separated list of granted scopes