---
title: "Authenticate via basic auth and create a session."
method: POST
path: "/auth/local/login"
tags: ["auth"]
---

# Authenticate via basic auth and create a session.

`POST /auth/local/login`

## Response `200`

Ok

- CurrentUser — CurrentUserExternal Model
  - `admin` boolean, required — If the user is an administrator.
  - `clientId` integer — The client id of the current session.
  - `createdAt` string, date-time, required — The date the user was created.
  - `elevatedUntil` string, date-time — The time until which the session is elevated.
  - `id` integer, required — The user id.
  - `name` string, required — The user name. For login.

## Other responses

- `401` — Unauthorized

---

[API](https://skmtc.net/gotify/apis/gotify-rest-api.md) · [All operations](https://skmtc.net/gotify/apis/gotify-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/gotify/gotify-rest-api/revisions/7b32fcdb1345/schema)
