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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"recordId": "<recordId>"
},
"name": "impersonate"
}
}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'). |