Create or replace the authenticator app

Add MCP server to your AI tool

Allow AI tools and LLMs to interact with the API documentation portal through MCP.

MCP server URL

https://openapi.logto.io/mcp

Standard setup for AI tools providing an mcp.json file

mcp.json
"Logto API references MCP server": {
  "url": "https://openapi.logto.io/mcp"
}
Close
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.

application/json

Body Required

  • secret string Required

    The TOTP secret for the authenticator app.

  • code string Required

    The TOTP code generated from the secret to confirm the binding.

Responses

  • 204

    The authenticator app was created or replaced successfully.

  • 400

    The provided secret or TOTP code is invalid.

  • 401

    Permission denied, identity verification is required or insufficient scope.

  • 403

    Forbidden

PUT /api/my-account/mfa-verifications/totp
curl \
 --request PUT 'https://[tenant_id].logto.app/api/my-account/mfa-verifications/totp' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{"secret":"string","code":"string"}'
Request examples
{
  "secret": "string",
  "code": "string"
}