Generate Backup Codes
Generate new backup codes for account recovery. Warning: This invalidates all previous backup codes. Store these codes securely - they are only shown once.
Body
required
application/json
- Type: stringFormat: passwordpasswordrequired
Current password to confirm identity
Responses
- application/json
- 400
Invalid password
- application/json
Request Example for post/auth/two-factor/generate-backup-codes
curl https://api.gpcn.com/v1/auth/two-factor/generate-backup-codes \
--request POST \
--header 'Content-Type: application/json' \
--header 'X-API-Key: YOUR_SECRET_TOKEN' \
--data '{
"password": ""
}'
{
"backupCodes": [
"abc123",
"def456",
"ghi789"
]
}.png)