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

# User login

`POST /v1/auth/login`

## Request body

- LoginRequest
  - `username` string, required
  - `password` string, password, required — At least one number and one letter

## Response `200`

Successful login

- LoginResponse
  - `user` User
    - `id` string
    - `email` string, email
    - `name` string
    - `role` 'user' | 'admin'
  - `tokens` AuthTokens
    - `access` Token
      - `token` string
      - `expires` string, date-time
    - `refresh` Token
      - `token` string
      - `expires` string, date-time

---

[API](https://skmtc.net/openloyalty/apis/loyalty-blockchain-api.md) · [All operations](https://skmtc.net/openloyalty/apis/loyalty-blockchain-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/openloyalty/loyalty-blockchain-api/revisions/e825144e9ffd/schema)
