This function generates an authentication code to enable configuration of two-factor authentication.
uapi --output=jsonpretty \ --user=username \ TwoFactorAuth \ generate_user_configuration
{- "apiversion": 3,
- "func": "generate_user_configuration",
- "module": "TwoFactorAuth",
- "result": {
- "data": {
- "otpauth_str": "otpauth://totp/Example%20cPanel%20L.L.C.:fakedomain?secret=S3I4WUY7MTHRMMWN&issuer=Example%20cPanel%20L.L.C.",
- "secret": "S3I4WUY7MTHRMMWN"
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}