Support staff can sign in as a user of the app to see what the user sees. The app has to allow it: it is off until the app's authorization settings turn on impersonation. Each session is short, cannot be refreshed, and its access token carries imp: true and an act claim naming who is really acting. Starting and ending one are recorded as app.user.impersonation.started and app.user.impersonation.ended events.
These routes take the app key (or a workspace key above the app).
Start a session as a user#
/v1/apps/:app_id/users/:user_id/impersonateApp keyName who is acting in one of two ways:
- actor: your backend names its support person, and Scute takes its word.
- actor_user_id: a user of this app who holds the user:impersonate permission on the target. The permission can ask for a verification or an approval, passed in challenge or approval.
curl -X POST https://api.scute.io/v1/apps/$SCUTE_APP_ID/users/$USER_ID/impersonate \ -H "Authorization: Bearer $SCUTE_APP_SECRET" \ -H "Content-Type: application/json" \ -d '{ "reason": "Ticket 4821: user cannot see their invoices", "minutes": 15, "actor": { "email": "support@acme.com", "name": "Sam Support" } }'{ "access": "eyJhbGciOiJSUzI1NiIs...", "access_expires_at": "2026-11-19T10:15:00Z", "csrf": "kZ3e...", "key_id": "c1b2...", "user_id": "0193f900-aaaa-bbbb-cccc-eeeeeeeeeeee", "session_id": "0193f990-aaaa-7bbb-8ccc-000000000003", "impersonation": { "actor": { "email": "support@acme.com", "name": "Sam Support", "kind": "backend" }, "reason": "Ticket 4821: user cannot see their invoices", "started_at": "2026-11-19T10:00:00Z", "expires_at": "2026-11-19T10:15:00Z" }}There is no refresh token. When the access token expires, the session is over.
With handoff: true the response has no tokens. It has session_id, impersonation and:
{ "handoff": { "code": "q8Zt...", "url": "https://app.acme.com/?sct_imp=q8Zt...", "expires_at": "2026-11-19T10:02:00Z" }}The code lasts 2 minutes and works once. The app's SDK reads sct_imp from the URL and exchanges it for the session. url is null when the app has no address.
| Status | Error | When |
|---|---|---|
| 403 | impersonation_disabled | The app does not allow signing in as users. |
| 403 | protected_user | The user has one of the app's protected roles, or the no_impersonation attribute. |
| 403 | user_banned, user_suspended | The user is banned or suspended. |
| 403 | actor_banned, actor_suspended | The acting user is banned or suspended. |
| 403 | not_permitted | The acting user does not hold user:impersonate on this user. The body has the decision. |
| 404 | user_not_found | No user with that id. |
| 422 | reason_required | No reason. |
| 422 | user_inactive | The user is not active. |
| 422 | actor_required | Neither actor.email, actor.name nor actor_user_id was sent. |
| 422 | actor_not_found | No user with the id in actor_user_id. |
| 422 | self | actor_user_id is the target user. |
List active sessions as a user#
/v1/apps/:app_id/users/:user_id/impersonationsApp keycurl https://api.scute.io/v1/apps/$SCUTE_APP_ID/users/$USER_ID/impersonations \ -H "Authorization: Bearer $SCUTE_APP_SECRET"{ "impersonations": [ { "session_id": "0193f990-aaaa-7bbb-8ccc-000000000003", "actor": { "email": "support@acme.com", "name": "Sam Support", "kind": "backend" }, "reason": "Ticket 4821: user cannot see their invoices", "started_at": "2026-11-19T10:00:00Z", "expires_at": "2026-11-19T10:15:00Z" } ]}End sessions as a user#
/v1/apps/:app_id/users/:user_id/impersonateApp keyEnds every active session as the user, or one when session_id is given.
curl -X DELETE "https://api.scute.io/v1/apps/$SCUTE_APP_ID/users/$USER_ID/impersonate?session_id=$SESSION_ID" \ -H "Authorization: Bearer $SCUTE_APP_SECRET"{ "ended": 1 }