Enable TOTP 2FA
Enable TOTP (authenticator app) 2FA for the current user. Returns a TOTP secret and QR code URI for setup. After scanning the QR code, verify the setup using the returned secret.
Body
required
application/json
- Type: stringFormat: passwordpasswordrequired
Current password to confirm identity
Responses
- application/json
- 400
Invalid password or 2FA already enabled
- application/json
Request Example for post/auth/two-factor/enable
curl https://api.gpcn.com/v1/auth/two-factor/enable \
--request POST \
--header 'Content-Type: application/json' \
--header 'X-API-Key: YOUR_SECRET_TOKEN' \
--data '{
"password": ""
}'
{
"totpURI": "string",
"secret": "string",
"backupCodes": [
"string"
]
}.png)