clerk.create_actor_token
Create an actor token that lets one user impersonate another in a connected Clerk application.
Sensitive — the returned token is a high-privilege secret that grants impersonation access; do not log or expose it.
Call clerk.get_connected_accounts first. Pass clerk_instance_id to target a specific connection, or omit it to use the default account.
Cost = 15 tokens.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| user_id | Yes | Clerk user id (user_...) of the user being impersonated. | |
| actor_sub | Yes | Clerk user id (user_...) of the impersonating actor (maps to actor.sub). | |
| clerk_instance_id | No | Clerk instance id (ins_...) from clerk.get_connected_accounts. Omit to use the default connected account. | |
| expires_in_seconds | No | Actor token lifetime in seconds (minimum 1). Defaults to 3600 (1 hour). | |
| session_max_duration_in_seconds | No | Maximum duration in seconds for the session created from this token (minimum 1). Defaults to 1800 (30 minutes). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| actor_token | No | Created Clerk actor token object from the Backend API. |