OAuth token endpoint
Exchanges an authorization code or a refresh token for tokens, accepting either application/x-www-form-urlencoded or application/json. For grant_type=authorization_code it verifies PKCE (S256 code_verifier against the stored challenge) and that client_id and redirect_uri match the original authorization; for grant_type=refresh_token it rotates the presented refresh token, carrying the original scopes forward, and detects reuse of an already-rotated token by revoking the entire token family. Confidential clients must authenticate with client_secret; public clients rely on PKCE. Returns an opaque short-lived Bearer access_token (expires_in seconds), a new rotating refresh_token, the token_type, and the space-delimited granted scope.
Form-encoded token exchange (OAuth 2.1)
Exchanges an authorizationcode for tokens, or rotates a refresh token. The request body is application/x-www-form-urlencoded (per RFC 6749), not JSON.
grant_type=authorization_code— sendcode,redirect_uri,client_id, and the PKCEcode_verifiermatching thecode_challengefrom the authorize step.grant_type=refresh_token— sendrefresh_token. Refresh tokens rotate: each use returns a new one and invalidates the old (reuse is detected and revokes the chain).
Authorization: Bearer ...), a rotating refresh token, token_type, and expires_in. Access tokens last ~1 hour; refresh tokens ~30 days.Body
authorization_code or refresh_token grant. Accepts application/x-www-form-urlencoded (the OAuth default) OR application/json.