Skip to main content
POST
Create a token exchange profile

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Body

application/json

Create or replace a profile. The name can't change on update.

name
string
required
Required string length: 1 - 64
Pattern: ^[A-Za-z0-9][A-Za-z0-9_.-]*$
token_url
string
required

The identity provider's token endpoint.

Required string length: 1 - 500
client_id
string
required

The router's own client.

Required string length: 1 - 200
client_secret
string | null

That client's secret. Omit to keep the stored one; '' removes it. Never returned — the response says only whether one is set.

Maximum string length: 500
audience
string | null

What the exchanged token is minted for, usually the backend's client id. An endpoint may override it.

Maximum string length: 200
scope
string | null
Maximum string length: 500
resource
string | null
Maximum string length: 500
subject_token_header
string | null

Header the caller's token is read from. Empty means 'authorization', with any 'Bearer ' prefix stripped.

Maximum string length: 100
cache_ttl_seconds
integer | null

How long an exchanged token is reused. The provider's own expires_in is used when it is shorter.

Required range: 0 <= x <= 86400
timeout_seconds
integer | null

Bounds one exchange call; a caller's request waits on it.

Required range: 1 <= x <= 60
verify_tls
boolean | null

Check the token endpoint's certificate. On unless set false.

Response

Successful Response

A profile as the UI sees it: everything but the secret itself.

name
string
required
token_url
string
required
client_id
string
required
has_client_secret
boolean
default:false
audience
string | null
scope
string | null
resource
string | null
subject_token_header
string | null
cache_ttl_seconds
integer | null
timeout_seconds
integer | null
verify_tls
boolean | null
endpoints
string[]
updated_by
string | null
updated_at
string<date-time> | null