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

# Login

`POST /api/v1/auth/login`

Authenticate with username and password to obtain an access token.

The returned `key` can be used for Bearer (or Token) authentication in subsequent requests:

```
Authorization: Bearer <key>
```

The token expires after a configurable period (default 162 hours). When it expires,
re-authenticate to obtain a new token.

## Request body

- object
  - `username` string, required — Username (email address) of the user to log in.
  - `password` string, password, required — Password of the user.
  - `max_token_lifetime_s` number — Duration (in seconds) for which the token will be valid. Default is 162 hours, which is also the maximum.

## Response `200`

OK

- object
  - `key` string, required — Access token to use for authentication.
  - `domain` string, required — The domain the token was issued for.

## Other responses

- `400` — Invalid input data.
- `429` — Request rate is too high, wait before sending more requests. See [Rate Limiting](/guides/overview#rate-limiting) for more details.
- `500` — Server failure while processing the request.
- `502` — Invalid response from the upstream server.
- `503` — We're temporarily offline for maintenance. Please try again later.
- `504` — Upstream server could not complete the request in time.

---

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