Authentication
Two-Factor Authentication
Return cPanel account 2FA data
This function returns the Two-Factor Authentication (2FA) configuration for a cPanel account, its email accounts, and its team user accounts.
get/twofactorauth_get_tfa_config_for_user
Query parameters
userstring username required
Example:example
The username for the account.
Response
HTTP Request was successful.
Example response
{
"data": {
"example": {
"email": {
"user@example.com": {
"secret": "QLLIU5WTY3UTJGNG"
}
},
"primary_account": {
"secret": "QLLIU5WTY3UTJGNG"
},
"team": {
"team_user@example": {
"secret": "QLLIU5WTY3UTJGNG"
}
}
}
},
"metadata": {
"command": "twofactorauth_get_tfa_config_for_user",
"reason": "OK",
"result": 1,
"version": 1
}
}