Authentication
Two-Factor Authentication
Create a one-time authentication secret and code
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.
get/twofactorauth_generate_tfa_config
Response
HTTP Request was successful.
Example response
{
"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
}
}