---
title: "Create or replace the authenticator app"
method: PUT
path: "/api/my-account/mfa-verifications/totp"
tags: ["My account"]
---

# Create or replace the authenticator app

`PUT /api/my-account/mfa-verifications/totp`

Create or replace the user's TOTP MFA verification with a new authenticator app binding. If the user already has a TOTP verification, it will be replaced; otherwise, a new one will be created. Requires a logto-verification-id header for sensitive permission checks, a valid TOTP secret, and a valid TOTP code generated from the secret.

## Request body

- object
  - `secret` string, required — The TOTP secret for the authenticator app.
  - `code` string, required — The TOTP code generated from the secret to confirm the binding.

## Response `204`

The authenticator app was created or replaced successfully.

## Other responses

- `400` — The provided secret or TOTP code is invalid.
- `401` — Permission denied, identity verification is required or insufficient scope.
- `403` — Forbidden

---

[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/versions/a163dc77d842/schema)
