---
title: "POST /api/user/2fa/totp/confirm"
method: POST
path: "/api/user/2fa/totp/confirm"
tags: ["user"]
---

# POST /api/user/2fa/totp/confirm

`POST /api/user/2fa/totp/confirm`

## Request

- The document declares no server URL.
- Auth: one of:
  - API key in header `Authorization`
  - API key in cookie `sessionid`

Finish adding the app with a code from it.

With the account's first method, this also returns the recovery codes,
the only time they are returned.

## Request body

- CodeRequest
  - `code` string, required

## Response `201`

- MethodAdded
  - `method` Method, required
    - `id` string, required: `totp-<n>` or `webauthn-<n>`
    - `kind` 'totp' | 'webauthn', required: * `totp` - totp * `webauthn` - webauthn
    - `name` string, required
    - `passkey` boolean, nullable, required: A key that can log in on its own. Null when the browser did not say.
    - `createdAt` string, date-time, nullable, required
    - `lastUsedAt` string, date-time, nullable, required
  - `recoveryCodes` string[], nullable, required: Only with the account's first method; shown once.

## Other responses

- `400`
- `401`
- `404`
- `405`
- `406`
- `415`
- `429`
- `500`

## Changes

- **2026-11-13** `7aaa5406d62c`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/frikanalen/apis/frikanalen-django-api/changes/api/user/2fa/totp/confirm/post.md)

---

[API](https://skmtc.dev/frikanalen/apis/frikanalen-django-api.md) - [All operations](https://skmtc.dev/frikanalen/apis/frikanalen-django-api/llms.txt) - [OpenAPI document](https://skmtc.dev/frikanalen/apis/frikanalen-django-api/revisions/ebd4175e41fe?raw)
