---
title: "登录"
method: POST
path: "/api/user/login"
tags: ["user-api"]
---

# 登录

`POST /api/user/login`

## Request

- The document declares no server URL.
- Auth: none declared

## Request body

- LoginReq
  - `username` string
  - `password` string

## Response `200`

A successful response.

- unknown

## Changes

- **2026-07-17** `02eb9de49433`: 1 info
  - api operation id `/api/user/login` removed and replaced with `login`
- **2021-01-01** `e7de8c26f5e0`: 1 info
  - api operation id `login` removed and replaced with `/api/user/login`

[Operation history](https://skmtc.dev/zeromicro/apis/go-zero-team-example-api/changes/api/user/login/post.md)

---

[API](https://skmtc.dev/zeromicro/apis/go-zero-team-example-api.md) - [All operations](https://skmtc.dev/zeromicro/apis/go-zero-team-example-api/llms.txt) - [OpenAPI document](https://skmtc.dev/zeromicro/apis/go-zero-team-example-api/revisions/02eb9de49433?raw)
