POST
/v1/mgmt/impersonate

Authorization

Descope Project ID and Management Key
AuthorizationBearer <token>

Project ID:Management Key as bearer token.

In: header

Request Body

application/json

loginId?string
impersonatorId?string
validateConsent?boolean
customClaims?object

Custom claims to include in the JWT as key-value pairs. Keys must be strings; values can be strings, numbers, or booleans.

Example{ "claim-name": "claim-value" }
selectedTenant?string
refreshDuration?integer
Formatint32

Impersonate a user, using a valid management key.

This API endpoint will allow you to impersonate a user using a login ID. The impersonator user must have the impersonation permission in order for this request to work. The response would be a refresh JWT of the impersonated user

curl -X POST "https://api.descope.com/v1/mgmt/impersonate" \  -H "Content-Type: application/json" \  -d '{}'
{  "jwt": "string"}
export interface Response {jwt?: string}
Was this helpful?