Create 2FA authentication code

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

SecurityBasicAuth
Responses
200

HTTP Request was successful.

Response Schema: application/json
apiversion
integer

The version of the API.

func
string

The name of the method called.

module
string

The name of the module called.

object
get/TwoFactorAuth/generate_user_configuration
Request samples
uapi --output=jsonpretty \
  --user=username \
  TwoFactorAuth \
  generate_user_configuration
Response samples
application/json
{
  • "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"
      },
    • "errors": null,
    • "messages": null,
    • "metadata": { },
    • "status": 1,
    • "warnings": null
    }
}