Get impersonation credentials for a user
Auth
Get impersonation credentials for a user
Issue an impersonation token that lets a SUPERADMIN (or ADMIN within their own organization) sign in as the target user via /api/auth/login. Also returns the caller’s original-admin token so the impersonated session can later be exited via /api/auth/exit-impersonation.
GET
Get impersonation credentials for a user
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Response
Impersonation credentials returned
Original admin payload returned alongside an impersonation token so the SPA can later restore the admin session via /api/auth/exit-impersonation.
Example:
{
"id": "5f7b1c2e8a1d4e0012c3b4a5",
"email": "admin@acme.example",
"fullName": "Acme Admin",
"organizationId": "5f7b1c2e8a1d4e0012c3b4a5",
"accessRole": "ADMIN",
"conversationOpenPreference": "split",
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI1Zjdi..."
}