Access Tokens

Exchange OIDC code for access token

Exchanges an OIDC authorization code for an access token. Creates a user if they do not exist.

post/access-tokens/exchange-with-oidc

Request

  • Base URL: /api (relative, and the document was published on a file host, not at the API’s origin)
  • URL: /api/access-tokens/exchange-with-oidc
  • Auth: none required

Request body

codestring required

Authorization code from OIDC provider

noncestring required

Nonce value for OIDC security

withHttpOnlyTokenboolean

Whether to include HTTP-only authentication cookie

Example request

{
  "code": "abc123def456ghi789",
  "nonce": "random-nonce-123456",
  "withHttpOnlyToken": true
}

Response

OIDC exchange successful

itemstring required

Access token for API authentication

Example response

{
  "item": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ4..."
}

Changes

No recorded changes to this operation across all 1 revision of this API.