Skip to navigation

Exchange a token

View as Markdown

Exchanges a JWT from a trusted issuer for an opaque crt_ token. The JWT is the credential, so the route takes no bearer token. Errors have the RFC 6749 shape.

Request

This endpoint expects an object.
grant_typeenumRequired
RFC 8693 token exchange or the RFC 7523 JWT bearer grant.
Allowed values:
subject_tokenstringOptional
The JWT. Token exchange only.
subject_token_typeenumOptional

The type of subject_token. Token exchange only.

Allowed values:
assertionstringOptional
The JWT. JWT bearer grant only.
requested_token_type"urn:ietf:params:oauth:token-type:access_token"Optional
Only the access token type.
audiencestringOptional
The tenant host, when sent.
resourcestringOptional
The tenant host, when sent.

Response headers

x-request-idstringOptional

The id of the request: req_ and a ULID. Every answer has it.

x-ratelimit-limit-requestsstringOptional
The size of the request bucket, per minute.
x-ratelimit-remaining-requestsstringOptional
The requests that remain.
x-ratelimit-reset-requestsstringOptional
The time until the request bucket is full.
x-ratelimit-limit-unitsstringOptional
The size of the units bucket, per minute. Absent when no limit applies.
x-ratelimit-remaining-unitsstringOptional
The units that remain.
x-ratelimit-reset-unitsstringOptional
The time until the units bucket is full.

Response

The new token.
access_tokenstring

An opaque crt_ token.

token_type"Bearer"
expires_ininteger1-9007199254740991
The life of the token, in seconds.
issued_token_typestring
The RFC 8693 issued token type.
scopestring
The scopes of the token, separated by spaces.

Errors

400
Bad Request Error
429
Too Many Requests Error
500
Internal Server Error
503
Service Unavailable Error