Impersonate a user
impersonateGenerate a non-refreshable auth token for an existing user without their password, enabling API calls on their behalf. Superuser access required.
Instructions
Generate an auth token for an existing user without their password (superuser only). Returns a non-refreshable token valid for the given duration, useful to make API calls on behalf of a user.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| duration | No | Token lifetime in seconds (default: collection auth token duration). | |
| recordId | Yes | Id of the user record to impersonate. | |
| collection | No | Auth collection (default 'users'). |