POST
/actor_tokensCreate actor token
Create an actor token that can be used to impersonate the given user.
The actor parameter needs to include at least a "sub" key whose value is the ID of the actor (impersonating) user.
- IdempotentThe SDK sends
Idempotency-Key, so a retried request is only applied once.
user_idstringrequired
The ID of the user being impersonated.
actorobjectrequired
The actor payload. It needs to include a sub property which should contain the ID of the actor.
This whole payload will be also included in the JWT session token.
expires_in_secondsintegeroptional
Optional parameter to specify the life duration of the actor token in seconds.
By default, the duration is 1 hour.
session_max_duration_in_secondsintegeroptional
The maximum duration that the session which will be created by the generated actor token should last.
By default, the duration of a session created via an actor token, lasts 30 minutes.
200Success
objectstringrequired
idstringrequired
statusstringrequired
user_idstringrequired
actorobjectrequired
tokenstringoptional
urlstringoptional
created_atintegerrequired
Unix timestamp of creation.
updated_atintegerrequired
Unix timestamp of last update.
400Request was not successful
errorsarray<object>required
metaobjectoptional
clerk_trace_idstringoptional
402Payment required
errorsarray<object>required
metaobjectoptional
clerk_trace_idstringoptional
403Feature not enabled
errorsarray<object>required
metaobjectoptional
clerk_trace_idstringoptional
422Invalid request parameters
errorsarray<object>required
metaobjectoptional
clerk_trace_idstringoptional
Error handling
A 400 is returned: Request was not successful. A 402 is returned: Payment required. A 403 is returned: Feature not enabled. A 422 is returned: Invalid request parameters.