Subject tokens

Create a new subject token.

Create a new subject token for the use of impersonating the user.

post/api/subject-tokens

Request

  • Base URL: https://[tenant_id].logto.app
  • URL: https://[tenant_id].logto.app/api/subject-tokens
  • Auth: OAuth 2 (client credentials, token URL /oidc/token, scopes: all)

Request body

userIdstring required

The ID of the user to impersonate.

contextobject

The additional context to be included in the token, this can be used in custom JWT.

Response

The subject token has been created successfully.

subjectTokenstring required
expiresInnumber required

Changes

No recorded changes to this operation across all 8 revisions of this API.