---
title: "Log in user and return login info"
method: POST
path: "/login"
tags: ["login"]
---

# Log in user and return login info

`POST /login`

Log in user and return login info:

- **token**: Bearer access token that can be used for authentication
- **roles**: Labels of user groups that user can see
- **permissions**: Permissions (octal) of the user in the MIRO Server namespace

## Request body

- AuthRequest
  - `username` string, required
  - `password` string, required

## Response `200`

Successful Response

- AuthResponse
  - `token` string, required
  - `roles` string[], required
  - `permissions` string, required

## Other responses

- `401` — Unauthorized
- `422` — Validation Error
- `500` — Internal Server Error

## Changes

- **2026-06-30** `358e5609409b` — 1 info
  - api operation id `login` removed and replaced with `login_login_post`
- **2026-02-24** `2ac7baf8418f` — 2 info
  - added the optional property `detail/items/ctx` to the response with the `422` status
  - added the optional property `detail/items/input` to the response with the `422` status
- **2022-12-22** `5366dfd18e83` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/gams-dev/apis/miro-server-api/changes/login/post.md)

---

[API](https://skmtc.dev/gams-dev/apis/miro-server-api.md) · [All operations](https://skmtc.dev/gams-dev/apis/miro-server-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/gams-dev/miro-server-api/revisions/358e5609409b/schema)
