---
title: "Api Login 2Fa"
method: POST
path: "/api/login/2fa"
---

# Api Login 2Fa

`POST /api/login/2fa`

## Request

- Base URL: `https://sleipnir.tv` (the document declares no server; this is the origin it was published from)
- URL: `https://sleipnir.tv/api/login/2fa`
- Auth: none declared

Second factor verification step.

Called after /api/login returns totp_required=True. The pending_token
identifies the half-completed login attempt; code is either a TOTP
code or a backup code (if use_backup_code=true).

On success: deletes the pending row, issues a session cookie.
On failure: decrements attempts_remaining. If at 0 (or already 0),
deletes the row, user must re-enter password.

## Request body

- Login2faBody
  - `pending_token` string, required
  - `code` string, required
  - `use_backup_code` boolean

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/sleipnir/apis/relay-control-plane.md) · [All operations](https://skmtc.dev/sleipnir/apis/relay-control-plane/llms.txt) · [OpenAPI document](https://skmtc.dev/sleipnir/apis/relay-control-plane/revisions/79829f6945a4?raw)
