POST

/api/auth/login

Email / password login

Authenticates a user with email and password, returns a JWT session token.

curl -s -X POST "$BASE/api/auth/login" \
  -H "Content-Type: application/json" \
  -d '{"email": "user@example.com", "password": "secret"}'

请求体

FieldTypeReqDefaultDescription
emailstringY
passwordstringY

响应示例

{
  "success": true,
  "data": {
    "token": "eyJhbGciOiJIUzI1NiIs...",
    "user": {
      "id": "u_abc123",
      "email": "user@example.com"
    }
  }
}

Try it out

Sign in to use your API key
Request Body
Response
Click Execute to test