This function generates a random secret and a one-time password authentication (OTP auth) URL for the user. Use the secret that this function returns and a valid verification token with WHM API 1's twofactorauth_set_tfa_config
function to configure Two-Factor Authentication (2FA) on an account.
HTTP Request was successful.
object | |
object |
whmapi1 --output=jsonpretty \ twofactorauth_generate_tfa_config
{- "data": {
- "otpauth_str": "otpauth://totp/Example:root?secret=CAOXW75HKYJJ6E5Y&issuer=Example",
- "secret": "WJ73QJSKZBXCFIPZ"
}, - "metadata": {
- "command": "twofactorauth_generate_tfa_config",
- "reason": "OK",
- "result": 1,
- "version": 1
}
}