v1

latestOpenAPI 3.0.2cPanel License2026-08-06657427.1 MB
TwoFactorAuth
Two-Factor Settings

Save 2FA config

This function configures the two-factor authentication settings for an account.

get/TwoFactorAuth/set_user_configuration

Query parameters

secretstring required
Example:JBSWY3DPEHPK3PXP

The 16-character string that UAPI's TwoFactorAuth::generate_user_configuration function generates.

tfa_tokeninteger required
Example:528112

The six-digit security code that the time-based one-time password (TOTP) authentication app generates.

Response

HTTP Request was successful.

apiversioninteger

The version of the API.

funcstring

The name of the method called.

modulestring

The name of the module called.

Example response

{
  "apiversion": 3,
  "func": "set_user_configuration",
  "module": "TwoFactorAuth",
  "result": {
    "data": {
      "tfa_configured": 1
    },
    "status": 1
  }
}