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

# User login

`POST /api/v1/auth/login`

Authenticates a user using their username and password. If the credentials are valid, a token is returned, which should be included in the `Authorization` header of subsequent requests.

## Request body

- LoginRequest — Request for login action.
  - `password` string, required
  - `username` string, required

## Response `200`

Successful login. Returns an authentication token.

- LoginResponse — Response for login action.
  - `timeout_s` integer, required — Authentication token validity/timeout in seconds. Token validity refreshed to this value with each request.
  - `token` string, required — Token to be used for authentication

---

[API](https://skmtc.net/256foundation/apis/braiins-os-public-rest-api.md) · [All operations](https://skmtc.net/256foundation/apis/braiins-os-public-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/256foundation/braiins-os-public-rest-api/revisions/d341c8e1d506/schema)
