---
title: "Verify TOTP code"
method: POST
path: "/totp/verify"
tags: ["TOTP Plugin"]
---

# Verify TOTP code

`POST /totp/verify`

Verifies a TOTP code from the authenticator app and completes authentication. Requires a pending TOTP cookie set during sign-in.

## Request body

- VerifyTOTPRequest
  - `code` string, required
  - `trust_device` boolean

## Response `200`

OK

- VerifyTOTPResponse
  - `session` Session, required
    - `created_at` string, date-time, required
    - `expires_at` string, date-time, required
    - `id` string, required
    - `ip_address` string, nullable
    - `token` string, required
    - `updated_at` string, date-time, required
    - `user_agent` string, nullable
    - `user_id` string, required
  - `user` User, required
    - `created_at` string, date-time, required
    - `email` string, required
    - `email_verified` boolean, required
    - `id` string, required
    - `image` string, nullable
    - `metadata` object, nullable
    - `name` string, required
    - `updated_at` string, date-time, required

---

[API](https://skmtc.net/authula/apis/authula-api.md) · [All operations](https://skmtc.net/authula/apis/authula-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/authula/authula-api/revisions/ee28a7965ce5/schema)
