OAuth2 Token Endpoint
POST /oauth2/access_token
Exchanges authorization codes or refresh tokens for access tokens.
Request Body required
Section titled “Request Body required ”object
Grant type, must be authorization_code or refresh_token or password or `otp
The client application’s identifier.
The client application’s secret.
Authorization code received from the /oauth2/authorize endpoint or the OTP code.
The same redirect URI used in the authorization request.
Original code verifier used in PKCE flow.
Refresh token for obtaining new access tokens.
Customer e-mail or for third-party authentication, use the values facebook, google, or apple. See documentation.
Plain-text password or JSON-encoded string of token, source, and name. See documentation.
object
Grant type, must be authorization_code or refresh_token or password or `otp
The client application’s identifier.
The client application’s secret.
Authorization code received from the /oauth2/authorize endpoint or the OTP code.
The same redirect URI used in the authorization request.
Original code verifier used in PKCE flow.
Refresh token for obtaining new access tokens.
Customer e-mail or for third-party authentication, use the values facebook, google, or apple. See documentation.
Plain-text password or JSON-encoded string of token, source, and name. See documentation.
object
Grant type, must be authorization_code or refresh_token or password or `otp
The client application’s identifier.
The client application’s secret.
Authorization code received from the /oauth2/authorize endpoint or the OTP code.
The same redirect URI used in the authorization request.
Original code verifier used in PKCE flow.
Refresh token for obtaining new access tokens.
Customer e-mail or for third-party authentication, use the values facebook, google, or apple. See documentation.
Plain-text password or JSON-encoded string of token, source, and name. See documentation.
Responses
Section titled “ Responses ”Successful token response.
object
The access token issued by the authorization server.
The type of the token issued (typically ‘Bearer’).
Lifetime in seconds of the access token.
Refresh token to obtain new access tokens.
Scopes granted to the access token.
Invalid request or authorization code.
Invalid client credentials or unauthorized request.