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.

Authorizations:
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

Response Schema: application/json
object

The data that the function returns.

object

Request samples

whmapi1 --output=jsonpretty \
  twofactorauth_get_user_configs

Response samples

Content type
application/json
{
  • "data": {
    • "example": {
      • "is_enabled": 0,
      • "primary_domain": "example.com"
      }
    },
  • "metadata": {
    • "command": "twofactorauth_get_user_configs",
    • "reason": "OK",
    • "result": 1,
    • "version": 1
    }
}