POST /v1/users/{user}/impersonate

Impersonate user (Log in as user)

Path parameters

  • user string Required

    User ID

Responses

  • 200 application/json

    successful operation

    Hide response attributes Show response attributes object
    • user object Required

      User schema

      Hide user attributes Show user attributes object
      • id string Required

        id

      • firstname string | null Required

        Firstname

      • lastname string | null Required

        Lastname

      • email string Required

        User email

      • emailVerifiedAt string | null Required

        User email verified at

    • token string Required

      Access Token

  • 404 application/json

    Not found

    Hide response attributes Show response attributes object

    Error schema

    • statusCode number Required

      Status Code

    • messages array[string] Required

      List of error messages

    • exception object

      Exception

POST /v1/users/{user}/impersonate
curl \
 --request POST 'https://classmanager.test/v1/users/usr_123123123/impersonate'
Response examples (200)
{
  "user": {
    "id": "usr_123123123123",
    "firstname": "John",
    "lastname": "Doe",
    "email": "new Email(john@example.com)",
    "emailVerifiedAt": "2023-11-08 14:05:51"
  },
  "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9"
}
Response examples (404)
{
  "statusCode": 42.0,
  "messages": [
    "string"
  ],
  "exception": {}
}