Impersonation

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.

Prior to this step, you can generate an impersonation token by visiting the Stytch Dashboard, viewing a user, and clicking the Impersonate User button.

post/v1/impersonation/authenticate

Request

  • Base URL
    https://api.stytch.com
  • Auth
    HTTP basic

Request body

impersonation_tokenstring required

The User Impersonation token to authenticate. Expires in 5 minutes by default.

Response

Successful response

request_idstring required

Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we may ask for this value to help identify a specific API call when helping you debug an issue.

user_idstring required

The unique ID of the affected User.

session_tokenstring required

A secret token for a given Stytch Session.

session_jwtstring required

The JSON Web Token (JWT) for a given Stytch Session.

status_codeinteger required

The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors.

Changes