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.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
OAuth2 client identifier
OAuth2 grant type
authorization_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