---
title: "Setup two-factor authentication"
method: POST
path: "/auth/2fa/setup"
tags: ["Auth"]
---

# Setup two-factor authentication

`POST /auth/2fa/setup`

Generates a TOTP secret, QR code, and provisioning URI.

## Response `200`

2FA setup data.

- TwoFactorSetupResponse
  - `secret` string — TOTP secret key.
  - `provisioning_uri` string — OTP auth URI for authenticator apps.
  - `qr_code` string — Base64-encoded QR code image (data URI).

---

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