---
title: "Login 2Fa"
method: POST
path: "/auth/login/2fa"
tags: ["internal"]
---

# Login 2Fa

`POST /auth/login/2fa`

## Request

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

Complete login with 2FA code.

Requires a valid temp_token from /login and a TOTP code.
Sets an httpOnly cookie with the JWT token for browser-based authentication.

## Request body

- TwoFactorLoginRequest: Request to complete login with 2FA.
  - `temp_token` string, required
  - `code` string, required

## Response `200`

Successful Response

- TokenResponse
  - `access_token` string, required
  - `token_type` string

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/companydata/apis/companydata-dk-api.md) · [All operations](https://skmtc.dev/companydata/apis/companydata-dk-api/llms.txt) · [OpenAPI document](https://skmtc.dev/companydata/apis/companydata-dk-api/revisions/1cc6c361ae64?raw)
