Get 2FA Status

Get the current 2FA configuration status for the authenticated user.

  • enabled: Always true (2FA is required for all users)
  • hasTOTP: Whether user has configured an authenticator app
  • hasBackupCodes: Whether user has backup codes generated

If hasTOTP is false, the user will use email OTP for 2FA verification. If hasTOTP is true, the user can use either TOTP or email OTP.

Responses
  • application/json
  • application/json
Request Example for get/auth/two-factor/status
curl https://api.gpcn.com/v1/auth/two-factor/status \
  --header 'X-API-Key: YOUR_SECRET_TOKEN'
{
  "success": true,
  "data": {
    "enabled": true,
    "hasTOTP": false,
    "hasBackupCodes": false
  }
}