Skip to main content
POST
Exchanges an identity provider's JWT for an access token
Workload identity federation is in Private Preview.

Body

An RFC 8693 token exchange request naming the trust rule to check as its audience.

grant_type
string
required

Always urn:ietf:params:oauth:grant-type:token-exchange

Example:

"urn:ietf:params:oauth:grant-type:token-exchange"

subject_token
string
required

The identity provider's JWT

Maximum string length: 16384
Example:

"<identity provider JWT>"

subject_token_type
string
required

urn:ietf:params:oauth:token-type:jwt or urn:ietf:params:oauth:token-type:id_token

Example:

"urn:ietf:params:oauth:token-type:jwt"

audience
string
required

ID of the trust rule to check the JWT against

Maximum string length: 64
Example:

"abcd1234"

requested_token_type
string | null

Optional; only urn:ietf:params:oauth:token-type:access_token is issued

access_token_lifetime_seconds
integer | null

Lifetime of the access token, in seconds. At most the rule's maximum.

Required range: x >= 1

Response

200 - application/json
access_token
string
required

Send as Authorization: Bearer

issued_token_type
string
required

Always urn:ietf:params:oauth:token-type:access_token

token_type
string
required

Always Bearer

expires_in
integer
required

Seconds until the access token expires