> ## Documentation Index
> Fetch the complete documentation index at: https://docs-dev-actions-triggers-prototype.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Impersonation

> Obtain an impersonation URL to log in as another user for troubleshooting purposes.

## Endpoint

`POST /users/{user_id}/impersonate`

Use this endpoint to obtain an impersonation URL to login as another user. Useful for troubleshooting.

### Remarks

* This endpoint can only be used with **Global Client** credentials.
* To distinguish between real logins and impersonation logins, the profile of the impersonated user will contain additional impersonated and impersonator properties. For example: `"impersonated": true, "impersonator": {"user_id": "auth0|...", "email": "admin@example.com"}`.
* For a regular web app, you should set the `additionalParameters`: set the `response_type` to be `code`, the `callback_url` to be the callback URL to which Auth0 will redirect with the authorization code, and the `scope` to be the JWT claims that you want included in the JWT.

## Body Parameters

<ParamField body="protocol" type="string" required />

<ParamField body="impersonator_id" type="string" required />

<ParamField body="client_id" type="string" required />

<ParamField body="additionalParameters" type="object" />

## Response Messages

| Status | Description                            |
| ------ | -------------------------------------- |
| 200    | Successful impersonation URL retrieval |
