---
title: "User login"
method: POST
path: "/api/v1/login"
tags: ["User"]
---

# User login

`POST /api/v1/login`

User login and return access token with cookie.

## Request body

- ParamLoginParam
  - `password` string
  - `username` string

## Response `200`

OK

- object
  - `data` AcAccount, required
    - `description` string
    - `lastLoginAt` string
    - `needReset` boolean
    - `nickname` string
    - `roles` AcRole[], required
      - `description` string
      - `name` string, required
      - `policies` AcPolicy[], required
        - `action` string, required
        - `domain` string, required
        - `object` string, required
    - `username` string, required
  - `message` string, required
  - `successful` boolean, required

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `500` — Internal Server Error

---

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