# Changing settings through rest api

**URL:** <https://forums.rocket.chat/t/changing-settings-through-rest-api/11097>\
**Category:** Rocket.Chat Apps\
**Tags:** design, rocketchat-apps\
**Created:** [May 3, 2021, 9:28am UTC](https://forums.rocket.chat/t/changing-settings-through-rest-api/11097 "2021-05-03T09:28:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sadeghhosseini](https://avatars.discourse-cdn.com/v4/letter/s/0ea827/32.png) [@sadeghhosseini](https://forums.rocket.chat/u/sadeghhosseini)\
**Post date:** [May 3, 2021, 9:28am UTC](https://forums.rocket.chat/t/changing-settings-through-rest-api/11097/1 "2021-05-03T09:28:53Z")

</div>

I am trying to change the administrator settings using REST API. I want to add custom CSS to layout by sending the following JSON payload to `/api/v1/settings/theme-custom-css`

```
{
  "_id": "theme-custom-css",
  "value": "\n[data-id='video-message'] {\n\tcursor: pointer;\n}\n\n\n\n[data-id='start-discussion'] {\n\tcursor: pointer;\n}\n\n\n[data-id='file-upload'] {\n\tcursor: pointer;\n}\n\n\n.rc-message-box__send {\n\tcursor: pointer; \n}"
}

```

The problem is that I get the following response form the endpoint:

```
{
  "success": false,
  "error": "TOTP Required [totp-required]",
  "errorType": "totp-required",
  "details": {
    "method": "password",
    "codeGenerated": false,
    "availableMethods": []
  }
}

```

What am I getting totp-required? And how can I fix this?

---

<div class="post-metadata">

**Author:** ![sadeghhosseini](https://avatars.discourse-cdn.com/v4/letter/s/0ea827/32.png) [@sadeghhosseini](https://forums.rocket.chat/u/sadeghhosseini)\
**Post date:** [May 3, 2021, 9:38am UTC](https://forums.rocket.chat/t/changing-settings-through-rest-api/11097/2 "2021-05-03T09:38:06Z")

</div>

Needed to Disable Account \> Two Factor Authentication \> Enforce Password Fallback.

EDIT:  
Based on [documentation](https://developer.rocket.chat/api/rest-api/2fa#request-new-headers-1), one can also do the following:  
pass these headers with each request  
`X-2fa-code: SHA256_of_your_password`  
`X-2fa-method: your_password`
