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.
Authorization
bearerAuth AuthorizationBearer <token>
In: header
Path Parameters
userId*string
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/api/auth/impersonate/string"{ "email": "sam.patel@acme.example", "impersonationToken": "imp_5f7b1c2e8a1d4e0012c3b4a5e6f7a8b9c0d1e2f3a4b5c6d7e8", "fullName": "Sam Patel", "originalAdmin": { "id": "5f7b1c2e8a1d4e0012c3b4a5", "email": "admin@acme.example", "fullName": "Acme Admin", "organizationId": "5f7b1c2e8a1d4e0012c3b4a5", "accessRole": "ADMIN", "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI1Zjdi..." }}