Skip to main content

Token exchange request/response schema

See Token API for the full endpoint reference. resource and scope are required here even though RFC 8693 makes them optional in general — a hop token that doesn't name exactly one target and one data class wouldn't be a narrowing, which is the only thing this endpoint exists to produce.

TokenExchangeRequest​

FieldTypeNotes
grant_typeliteralurn:ietf:params:oauth:grant-type:token-exchange
subject_tokenstr
subject_token_typeliteralurn:ietf:params:oauth:token-type:jwt
resourcestr (max 512)Required
scopestr (max 128)Required
actor_token / actor_token_typestr | nullOptional today; required once identity proof-of-possession ships
audiencestr | null

TokenExchangeResponse​

FieldType
access_tokenstr
issued_token_typeurn:ietf:params:oauth:token-type:jwt
token_typeBearer
expires_inint
scopestr

OAuthError (RFC 6749 §5.2)​

{"error": "invalid_grant", "error_description": "..."}

error is one of invalid_request, invalid_grant, invalid_target, unsupported_grant_type.

HopTokenClaims — the issued JWT's claim set​

ClaimNotes
iss, sub, audIssuer, subject (unchanged across the chain), audience (this hop's target)
scope, resourceThis hop's narrowed data class and target
exp, iat, jtiStandard; jti is single-use (replay-guarded)
session_id, policy_versionThe pinned session and policy this token was decided against
hopDerived depth
actNested delegation proof, or absent at hop 1