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

Request

  • Base URL
    https://whm-server.tld:2087/json-api
  • Auth
    HTTP basic

Query parameters

userstring username required
Example:example

The username for the account.

Response

HTTP Request was successful.

dataunknown

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
  }
}

Changes

No recorded changes to this operation across all 5 revisions of this API.