Update Forced 2FA Setting

Update the forced 2FA setting at the platform level to control whether 2FA is mandatory for all accounts.

Request URL

PUT {base_url}/uc-auth/api/v1/admin/security/mfa/forced-config

Request parameters

Headers
Parameter Required Type Description
Authorization Yes String The access token used for authentication.

Format: Bearer {access_token}.

Body parameters
Parameter Required Type Description
enabled Yes Boolean

Whether to enforce 2FA for all accounts.

Valid value:

  • true: Enforce 2FA for all accounts.
  • false: Do not force 2FA for all accounts.

Response parameters

Parameter Type Description
requestId String The unique ID of the request, which can be used to quickly locate the request.
code String The HTTP status code of the request.
  • 200: Request succeeded.
  • Non-200 value: Request failed.
message String The status message of the request.
detailMessage String The detailed error information.

When the request is successful, this parameter returns empty.

Example

Request example

PUT /uc-auth/api/v1/admin/security/mfa/forced-config HTTP/1.1
Host: api.cn.novoone.com
Authorization: Bearer eyJraWQiOiJjbi0wLWtleS0xIiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiJkaXN0cmlidXRvcmV4YW1wbGVAb3V0bG9vay5jb20iLCJhcHBfa2V5Ijoic2xOdnQzaHc1NXB2Vm5HRlNhR2ZOVTNmMWxYQ3lpa08iLCJncmFudF90eXBlIjoib3BlbmFwaSIsImNsaWVudF9leHQiOnsiZGVzY3JpcHRpb24iOiLnrKzkuInmlrnlkIjkvZzkvJnkvLTlupTnlKgiLCJwYXJ0bmVyIjoi56S65L6L5ZCI5L2c5LyZ5Ly0In0sImNsaWVudF90eXBlIjoib3BlbmFwaSIsImV4cCI6MTc5MTg4NDg2NywiaWF0IjoxNzkxODYzMjY3LCJqdGkiOiIyMzk1Zjk2NS01MjA3LTRhN2QtYjc0ZS1mNmJjZmQxN2JiZGYiLCJjbGllbnRfaWQiOiJub3ZvLW9wZW4tcGxhdGZvcm0iLCJ1c2VyX2V4dCI6eyJyb2xlSWRzIjpbM10sInN0eXBlIjoiQURNSU4iLCJ0ZW5hbnRDb2RlIjpudWxsLCJ0eXBlIjoiUF9BQ0NPVU5UIiwidXNlcklkIjozMDc2OTEzNjQ0OTE1OTk4NzIwLCJlbWFpbCI6ImRpc3RyaWJ1dG9yZXhhbXBsZUBvdXRsb29rLmNvbSIsInVzZXJuYW1lIjoiZGlzdHJpYnV0b3JleGFtcGxlQG91dGxvb2suY29tIiwidWNJZCI6MzA3NjkxMzY0NDg5MDgzMjg5Nn19.dedsPD_95Rya6EPkzg-ygaC-BHfwlTF4y3CrK1v6Sm8Ga8bgGuNWc8hjkW2YBIF3poXdL9Ptu4LDzypjv4Zc2gUJru22UEnkVjpC_RyPtUzRUz2g1YixqQlXwAklmzYB9zxD9e3HW3RKNzd9nswqNjDKGabbSMzCrJauecoxZPoBXy-ttStuMBQKOHwDOf0rE6sWjGXBkdb70BzvwA1HUAx_sA--l5WYKhRGbnYSv93LBeLLufI_lXEaPcX8fg17nocZTednmGGkFJifOEiG2QGHYySbJ84NzoOo46jOxsPdpLHYXTYjnUuuQH5m5k3niLXYhnsWV-S9UzgDWqLSVg
Content-Type: application/json
{
  "enabled": false
}

Response example

HTTP/1.1 200 OK
{
  "requestId": "3e800103212f46ba3af53711c11c4c99",
  "code": "200",
  "message": "SUCCESS"
}