---
title: "POST /v1/account/2fa/enable"
method: POST
path: "/v1/account/2fa/enable"
tags: ["AccountService"]
---

# POST /v1/account/2fa/enable

`POST /v1/account/2fa/enable`

Enable2FA 开启二步验证，返回 TOTP 二维码 URI 和备份码

## Request body

- AccountV1Enable2FARequest

## Response `200`

OK

- AccountV1Enable2FAReply
  - `backupCodes` string[] — 明文备份码列表（仅展示一次，用户需自行保存）
  - `totpUri` string — otpauth:// URI，供前端生成二维码

---

[API](https://skmtc.dev/apiqik/apis/apiqik-api.md) · [All operations](https://skmtc.dev/apiqik/apis/apiqik-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/apiqik/apiqik-api/revisions/e06b96127408/schema)
