Save 2FA config

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

SecurityBasicAuth
Request
query Parameters
secret
required
string <= 16 characters

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

Example: secret=JBSWY3DPEHPK3PXP
tfa_token
required
integer <= 6 characters

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

Example: tfa_token=528112
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/set_user_configuration
Request samples
uapi --output=jsonpretty \
  --user=username \
  TwoFactorAuth \
  set_user_configuration \
  secret='JBSWY3DPEHPK3PXP' \
  tfa_token='528112'
Response samples
application/json
{
  • "apiversion": 3,
  • "func": "set_user_configuration",
  • "module": "TwoFactorAuth",
  • "result": {
    • "data": {
      • "tfa_configured": 1
      },
    • "errors": null,
    • "messages": null,
    • "metadata": { },
    • "status": 1,
    • "warnings": null
    }
}