---
title: "Login as user"
method: POST
path: "/api/v1/users/loginas"
tags: ["Users"]
---

# Login as user

`POST /api/v1/users/loginas`

Performs user impersonation via the 'Login As' feature, allowing administrators to simulate another user's session

## Request body

- LoginAsForm
  - `userId` string, required
  - `password` string, required

## Response `200`

Login as operation successful

- ResponseEntityLoginAsView
  - `errors` ErrorEntity[]
    - `errorCode` string
    - `message` string
    - `fieldName` string
  - `entity` object
  - `messages` MessageEntity[]
    - `message` string
  - `i18nMessagesMap` object
  - `permissions` string[]
  - `pagination` Pagination
    - `currentPage` integer
    - `perPage` integer
    - `totalEntries` integer

## Other responses

- `400` — Bad request - invalid user credentials
- `401` — Unauthorized - authentication failed
- `403` — Forbidden - insufficient permissions or missing Login As role
- `500` — Internal server error

---

[API](https://skmtc.dev/jostens/apis/dotcms-rest-api.md) · [All operations](https://skmtc.dev/jostens/apis/dotcms-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/jostens/dotcms-rest-api/revisions/a088fe9f515c/schema)
