# Impersonate a user

Allows a service to impersonate a user by their username. This will return a token that can be used to act on behalf the user's account. Only bots can be impersonated, not regular users.

RBAC:
- requires ALL of Users.Manage, Users.Impersonate

Endpoint: GET /api/v1/admin/impersonate
Version: 1.0
Security: header

## Query parameters:

  - `username` (string, required)
    Username of the bot user to impersonate. Must be a bot account, not a regular user. Case-insensitive.

## Response 200 fields (application/json):

  - `sessionKey` (string, required)
    Persistent Token

## Response 400 fields (application/json):

  - `errorCode` (string, required)
    Error code

  - `message` (string, required)
    Error message

  - `docUrl` (string)
    Link to documentation

## Response 403 fields (application/json):

  - `errorCode` (string, required)
    Error code

  - `message` (string, required)
    Error message

  - `docUrl` (string)
    Link to documentation

## Response 404 fields (application/json):

  - `errorCode` (string, required)
    Error code

  - `message` (string, required)
    Error message

  - `docUrl` (string)
    Link to documentation


