Endpoints
post/api/v1/token/exchange

Request

  • The document declares no server URL.
  • Auth: none declared

Request body

identity_provider'entra_id' | 'tokenx' | 'maskinporten' | 'idporten' | 'ansattporten' required

Identity providers for use with token fetch, exchange and introspection.

skip_cacheboolean nullable

Force renewal of token. Defaults to false if omitted.

targetstring required

Scope or identifier for the target application.

user_tokenstring required

The user's access token, usually found in the Authorization header in requests to your application.

Response

Success

access_tokenstring required
expires_ininteger required

Token expiry in seconds. Useful for caching purposes.

token_type'Bearer' required

Token type is always Bearer, but this might change in the future.

Changes

    • breaking

      the response property became optional for the status

    • breaking

      the response property became optional for the status

    • info

      added the new ansattporten enum value to the request property (media type: application/json)

    • info

      added the new ansattporten enum value to the request property (media type: application/x-www-form-urlencoded)