Update cPanel account's 2FA data

This function updates the Two-Factor Authentication (2FA) configuration for the given cPanel user.

SecurityBasicAuth
Request
Request Body schema: application/json
required
additional property
object

The cPanel user account for which to set the 2FA config.

Responses
200

HTTP Request was successful.

Response Schema: application/json
object
post/twofactorauth_set_tfa_config_for_user
Request samples
application/json
{
  • "example": {
    • "email": {
      • "user@example.com": {
        • "secret": "QLLIU5WTY3UTJGNG"
        }
      },
    • "primary_account": {
      • "secret": "QLLIU5WTY3UTJGNG"
      },
    • "team": {
      • "team_user@example": {
        • "secret": "QLLIU5WTY3UTJGNG"
        }
      }
    }
}
Response samples
application/json
{
  • "metadata": {
    • "command": "twofactorauth_set_tfa_config_for_user",
    • "reason": "OK",
    • "result": 1,
    • "version": 1
    }
}