---
title: "Verify TOTP verification"
method: POST
path: "/api/experience/verification/totp/verify"
tags: ["Experience"]
---

# Verify TOTP verification

`POST /api/experience/verification/totp/verify`

Verifies the provided TOTP code against the new created TOTP secret or the existing TOTP secret. If a verificationId is provided, this API will verify the code against the TOTP secret that is associated with the verification record. Otherwise, a new TOTP verification record will be created and verified against the user's existing TOTP secret.

## Request body

- object
  - `code` string, required — The TOTP code to be verified.
  - `verificationId` string — The verification ID of the newly created TOTP secret. This ID is required to verify a newly created TOTP secret that needs to be bound to the user account. If not provided, the API will create a new TOTP verification record and verify the code against the user's existing TOTP secret.

## Response `200`

The TOTP code has been successfully verified.

- object
  - `verificationId` string, required — The unique verification ID of the TOTP verification record. For newly created TOTP secret verification record, this ID is required to bind the TOTP secret to the user account through `Profile` API.

## Other responses

- `400` — Invalid TOTP code.
- `404` — Verification record not found.

---

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