Authenticate an impersonation token to impersonate a User. This endpoint requires an impersonation token that is not expired or previously used. A Stytch session will be created for the impersonated user with a 60 minute duration. Impersonated sessions cannot be extended.
Authenticate Impersonation Token
POST
https://test.stytch.com/v1/impersonation/authenticateBody parameters
impersonation_token* string
Response fields
request_id string
status_code int
user_id string
user object
session_token string
session_jwt string
session object
curl --request POST \
--url https://test.stytch.com/v1/impersonation/authenticate \
-u 'PROJECT_ID:SECRET' \
-H 'Content-Type: application/json' \
-d '{
"impersonation_token": "SeiGwdj5lKkrEVgcEY3QNJXt6srxS3IK2Nwkar6mXD4="
}'
RESPONSE
200
{
"status_code": 200,
"request_id": "request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141",
"user_id": "user-test-16d9ba61-97a1-4ba4-9720-b03761dc50c6",
"session_jwt": "example_jwt",
"session_token": "mZAYn5aLEqKUlZ_Ad9U_fWr38GaAQ1oFAhT8ds245v7Q",
"user": {...},
"session": {...}
}