Return cPanel accounts with 2FA enabled

This function returns a list of user-controlled accounts and whether the accounts have Two-Factor Authentication (2FA) enabled.

SecurityBasicAuth
Request
query Parameters
user
string <username>

The username for a specified account.

Note:

If you do not specify a value, the function returns all user accounts.

Example: user=example
Responses
200

HTTP Request was successful.

Response Schema: application/json
object

The data that the function returns.

object
get/twofactorauth_get_user_configs
Request samples
whmapi1 --output=jsonpretty \
  twofactorauth_get_user_configs
Response samples
application/json
{
  • "data": {
    • "example": {
      • "is_enabled": 0,
      • "primary_domain": "example.com"
      }
    },
  • "metadata": {
    • "command": "twofactorauth_get_user_configs",
    • "reason": "OK",
    • "result": 1,
    • "version": 1
    }
}