---
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
- `403` — Forbidden

## Changes

> 55 revisions in range; 2 not diffed.

- **2026-08-04** `38a261ada0e8` — 1 info
  - added the non-success response with the status `403`
- **2026-04-11** `1f9975384d55` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/gotify/apis/gotify-rest-api/changes/auth/local/login/post.md)

---

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