v1

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

Create 2FA authentication code

This function generates an authentication code to enable configuration of two-factor authentication.

get/TwoFactorAuth/generate_user_configuration

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": "generate_user_configuration",
  "module": "TwoFactorAuth",
  "result": {
    "data": {
      "otpauth_str": "otpauth://totp/Example%20cPanel%20L.L.C.:fakedomain?secret=S3I4WUY7MTHRMMWN&issuer=Example%20cPanel%20L.L.C.",
      "secret": "S3I4WUY7MTHRMMWN"
    },
    "status": 1
  }
}