---
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

- **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/5366dfd18e83/schema)
