# Update 2FA authentication secret and code This function sets the secret and the authentication code for Two-Factor Authentication (2FA) for the or reseller account. You can generate a random secret and an OTP authentication URL with WHM API 1's  function. Endpoint: GET /twofactorauth_set_tfa_config Version: 11.134.0.5 Security: BasicAuth ## Query parameters: - `secret` (string, required) A generated code for use with 2FA in Base32 format. Example: "WJ73QJSKZBXCFIPZ" - `tfa_token` (string, required) The time-based one-time password (TOTP) that the authentication app provides. Example: "227174" ## Response 200 fields (application/json): - `data` (object) - `data.success` (integer) Whether the account successfully enabled 2FA. * — Enabled. * — enabled. Enum: 0, 1 - `metadata` (object) - `metadata.command` (string) The method name called. Example: "twofactorauth_set_tfa_config" - `metadata.reason` (string) The reason the API function failed when the field is . This field may display a success message when a function succeeds. Example: "OK" - `metadata.result` (integer) * — Success. * — Failed. Check the field for more details. Enum: 0, 1 - `metadata.version` (integer) The version of the API function. Example: 1