---
title: "Update 2FA account config (updateTwoFaAccountConfig)"
method: PUT
path: "/api/2fa/account/config"
tags: ["two-factor-auth-config-controller"]
---

# Update 2FA account config (updateTwoFaAccountConfig)

`PUT /api/2fa/account/config`

Update config for a given provider type. 
Update request example:
```
{
  "useByDefault": true
}
```
Returns whole account's 2FA settings object.


Available for any authorized user.

## Query parameters

- `providerType` 'TOTP' | 'SMS' | 'EMAIL' | 'BACKUP_CODE', required

## Request body

- TwoFaAccountConfigUpdateRequest
  - `useByDefault` boolean

## Response `200`

OK

- AccountTwoFaSettings
  - `configs` object

---

[API](https://skmtc.net/thingsboard/apis/thingsboard-rest-api.md) · [All operations](https://skmtc.net/thingsboard/apis/thingsboard-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/thingsboard/thingsboard-rest-api/revisions/40169ccdec5c/schema)
