OAuth2 Flow

Authorization Code Exchange

Exchange authorization code for access token and refresh token.

post/rest/v2/auth/auth-code-redemption.json

Request

Request body application/x-www-form-urlencoded

grant_type'authorization_code' required

OAuth2 grant type. Must be 'authorization_code'.

client_idstring required

OAuth2 client identifier.

client_secretstring required

OAuth2 client secret (base64 encoded).

codestring required

Authorization code received from authorization endpoint.

redirect_uristring uri required

Redirect URI used in authorization request.

code_verifierstring

PKCE code verifier (required if code_challenge was used).

Response

Successful token exchange

access_tokenstring required

OAuth2 access token (JWT format)

token_type'Bearer' required

Token type for authorization header

expires_ininteger required

Access token lifetime in seconds

refresh_tokenstring

Refresh token for obtaining new access tokens

scopestring

Granted access scope

Example response

{
  "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...",
  "expires_in": 3600,
  "refresh_token": "def50200a1b2c3d4e5f6...",
  "scope": "rsu_api_read rsu_api_write"
}

Changes

No recorded changes to this operation across all 1 revision of this API.