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

# User login

`POST /auth/login`

Authenticate with username and password to receive a JWT token.

## Request body

- PkgServerLoginRequest
  - `environment_id` integer
  - `password` string
  - `server_id` string — For backward compatibility
  - `username` string

## Response `200`

OK

- PkgServerLoginResponse
  - `access_token` string
  - `user` PkgServerUserSummary
    - `id` integer
    - `role` string
    - `username` string

## Other responses

- `401` — Unauthorized

---

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