---
title: "Login to the dashboard API"
method: POST
path: "/api/v1/auth/login"
tags: ["Auth"]
---

# Login to the dashboard API

`POST /api/v1/auth/login`

## Request body

- LoginRequest
  - `username` string, required
  - `password` string, required
  - `code` string — TOTP code or recovery code when two-factor authentication is required.
  - `trust_device_flag` boolean

## Response `200`

Standard AstrBot success response

- SuccessEnvelope
  - `status` 'ok', required
  - `message` string
  - `data` unknown, required

## Other responses

- `401` — Standard AstrBot error response

## Changes

- **2026-06-14** `6b73b947caab` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/astrbotdevs/apis/astrbot-openapi-v1/changes/api/v1/auth/login/post.md)

---

[API](https://skmtc.dev/astrbotdevs/apis/astrbot-openapi-v1.md) · [All operations](https://skmtc.dev/astrbotdevs/apis/astrbot-openapi-v1/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/astrbotdevs/astrbot-openapi-v1/revisions/6b73b947caab/schema)
