# Cannot update Cloud Recording Setting and get 400 response

**URL:** <https://devforum.zoom.us/t/cannot-update-cloud-recording-setting-and-get-400-response/52536>\
**Category:** API and Webhooks\
**Tags:** faq\
**Created:** [June 16, 2021, 2:37am UTC](https://devforum.zoom.us/t/cannot-update-cloud-recording-setting-and-get-400-response/52536 "2021-06-16T02:37:51Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lecture\_UnivT](https://avatars.discourse-cdn.com/v4/letter/l/f04885/32.png) [@Lecture\_UnivT](https://devforum.zoom.us/u/Lecture_UnivT)\
**Post date:** [June 16, 2021, 2:37am UTC](https://devforum.zoom.us/t/cannot-update-cloud-recording-setting-and-get-400-response/52536/1 "2021-06-16T02:37:51Z")

</div>

**Description**  
This issue is about Cloud Recording.  
Via API, I tried to update meeting recording setting, but failed with Response 400.  
(Relevant URL: [https://marketplace.zoom.us/docs/api-reference/zoom-api/cloud-recording/recordingsettingsupdate](https://marketplace.zoom.us/docs/api-reference/zoom-api/cloud-recording/recordingsettingsupdate))

**Error**  
After I sent an PATCH requests, then I get \<Response [400]\>.

**Which App Type (OAuth / Chatbot / JWT / Webhook)?**  
JWT. Hence I think the scope is not an issue as JWT’s scope is everything. (Am I correct?)

**Which Endpoint/s?**

**How To Reproduce (If applicable)**  
Steps to reproduce the behavior:

1. [http://api.zoom.us/v2/meetings/GfRucSrAQAa+gNRAiwBmew==/recordings/settings](http://api.zoom.us/v2/meetings/GfRucSrAQAa+gNRAiwBmew==/recordings/settings)

Headers (without credentials)

```auto
headers = {
    'authorization': "Bearer WITHOUTCREDENTIALS",
    'content-type': "application/json"
    }

```

(I confirmed the above header worked for “List all recordings” API task.)

Body

```auto
httpPatchOptions = {
  "share_recording": "publicly",
  "recording_authentication": False,
  "authentication_option": None,
  "authentication_domains": None,
  "viewer_download": False,
  "password": "1#F7*X9z",
  "on_demand": False,
  "approval_type": 2,
  "send_email_to_host": False,
  "show_social_share_buttons": False
}

```

1. See the Response 400.

**Screenshots (If applicable)**

 ![forumInquiry](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/2/d/2d2409577253b09cf645af03a6535d6357113bc4.png)

**Additional context**  
The header works for a diffenrent API task, hence I think there is no issue on authorization. The header is the JWT credentials.

---

<div class="post-metadata">

**Author:** ![Lecture\_UnivT](https://avatars.discourse-cdn.com/v4/letter/l/f04885/32.png) [@Lecture\_UnivT](https://devforum.zoom.us/u/Lecture_UnivT)\
**Post date:** [June 16, 2021, 2:41am UTC](https://devforum.zoom.us/t/cannot-update-cloud-recording-setting-and-get-400-response/52536/2 "2021-06-16T02:41:24Z")

</div>

I hereby attach the scripts of the screenshot.  
Thanks!

```auto

zoomAPI = "http://api.zoom.us"
meetingId = "w3ZSEyrzSCCwc0seSx2y6g=="

headers = {
    'authorization': "Bearer SECRET",
    'content-type': "application/json"
    }

httpPatchOptions = {
  "share_recording": "publicly",
  "recording_authentication": False,
  "authentication_option": None,
  "authentication_domains": None,
  "viewer_download": False,
  "password": "1#F7*X9z",
  "on_demand": False,
  "approval_type": 2,
  "send_email_to_host": False,
  "show_social_share_buttons": False
}

recordingSettingAPI = zoomAPI + "/v2/meetings/"+ meetingId + "/recordings/settings"

r = requests.patch(recordingSettingAPI, headers=headers, json=httpPatchOptions)

print("THIS IS THE ISSUE.--->", r)

#reference
r = requests.get(recordingSettingAPI, headers=headers)
print("For your reference, I hereby prove the header itself works. This case, the response is 200 and r.text is", r.text)

```

---

<div class="post-metadata">

**Author:** ![MaxM](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/maxm/32/42303_2.png) [@MaxM](https://devforum.zoom.us/u/MaxM)\
**Post date:** [June 17, 2021, 1:09am UTC](https://devforum.zoom.us/t/cannot-update-cloud-recording-setting-and-get-400-response/52536/3 "2021-06-17T01:09:02Z")

</div>

Hey @Lecture_UnivT,

Thank you for reaching out to the Zoom Developer Forum.

> [@Lecture\_UnivT](#):
>
> ```auto
> "authentication_option": None,
> "authentication_domains": None,
> 
> ```

Try removing those values or putting quotes around “None” as the API expects a string here:

![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/8/3/83d8b71cadcfa3fba8142c92829dc4faae679718.png)

Thanks,  
Max

---

<div class="post-metadata">

**Author:** ![Lecture\_UnivT](https://avatars.discourse-cdn.com/v4/letter/l/f04885/32.png) [@Lecture\_UnivT](https://devforum.zoom.us/u/Lecture_UnivT)\
**Post date:** [June 17, 2021, 1:39am UTC](https://devforum.zoom.us/t/cannot-update-cloud-recording-setting-and-get-400-response/52536/4 "2021-06-17T01:39:16Z")

</div>

Dear MaxM,

Thanks for your reply.  
As you kindly advised I have just tried (deleting the following part), however

```auto
 "authentication_option": None,
 "authentication_domains": None,

```

the response is still  
`<Response [400]>`  
and  
r.content is the following:

`b'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><error><code>300</code><message>Request Body should be a valid JSON object.</message></error>'`

I tried with the following request sentences too, in vain though (all resonses were 400):

`r = requests.patch(recordingSettingAPI, headers=headers, data=httpPatchOptions)`

`r = requests.patch(recordingSettingAPI, data=json.dumps(httpPatchOptions), headers=headers)`

`r = requests.patch(recordingSettingAPI, json=httpPatchOptions, headers=headers)`

`r = requests.patch(recordingSettingAPI, json=json.dumps(httpPatchOptions), headers=headers)`

I really wish to solve this issue for the sake of my university. I am looking foward to hear from you. Thanks in advance.

---

<div class="post-metadata">

**Author:** ![MaxM](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/maxm/32/42303_2.png) [@MaxM](https://devforum.zoom.us/u/MaxM)\
**Post date:** [June 18, 2021, 5:17am UTC](https://devforum.zoom.us/t/cannot-update-cloud-recording-setting-and-get-400-response/52536/5 "2021-06-18T05:17:48Z")

</div>

Hey @Lecture_UnivT,

Thanks for getting back to me. Along with the previous change, please also change all the `False` values to be lowercase: `false`

That should be all you need.

Thanks,  
Max

---

<div class="post-metadata">

**Author:** ![Lecture\_UnivT](https://avatars.discourse-cdn.com/v4/letter/l/f04885/32.png) [@Lecture\_UnivT](https://devforum.zoom.us/u/Lecture_UnivT)\
**Post date:** [June 18, 2021, 7:53am UTC](https://devforum.zoom.us/t/cannot-update-cloud-recording-setting-and-get-400-response/52536/6 "2021-06-18T07:53:54Z")

</div>

Thanks. But it does not work yet.  
I still get Response 400 after running the following code.  
(As this is Python, and hence `false` does not work, as it would perceived as an undefined variable, and hence I put them in parentheses. )

Could you please advice me on what else I could do?

```auto
httpPatchOptions = {
  "share_recording": "publicly",
  "recording_authentication": "false",
  "viewer_download": "false",
  "password": "1#F7*X9z",
  "on_demand": "false",
  "approval_type": 2,
  "send_email_to_host": "false",
  "show_social_share_buttons": "false",
}
    
recordingSettingAPI = zoomAPI + "/v2/meetings/"+ meetingId + "/recordings/settings"
print(recordingSettingAPI)

r = requests.patch(recordingSettingAPI, data=json.dumps(httpPatchOptions), headers=headers)

```

---

<div class="post-metadata">

**Author:** ![MaxM](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/maxm/32/42303_2.png) [@MaxM](https://devforum.zoom.us/u/MaxM)\
**Post date:** [June 21, 2021, 8:05pm UTC](https://devforum.zoom.us/t/cannot-update-cloud-recording-setting-and-get-400-response/52536/7 "2021-06-21T20:05:51Z")

</div>

Hey @Lecture_UnivT,

Thanks for testing that out and for clarifying - I didn’t realize you were showing me Python code.

> [@Lecture\_UnivT](#):
>
> `json.dumps(httpPatchOptions)`

Would you be able to provide the output of that function so that I can check the request body directly?

I’ll use that to double check a valid request is being sent.

Thanks,  
Max

---

<div class="post-metadata">

**Author:** ![Lecture\_UnivT](https://avatars.discourse-cdn.com/v4/letter/l/f04885/32.png) [@Lecture\_UnivT](https://devforum.zoom.us/u/Lecture_UnivT)\
**Post date:** [June 22, 2021, 1:19am UTC](https://devforum.zoom.us/t/cannot-update-cloud-recording-setting-and-get-400-response/52536/8 "2021-06-22T01:19:03Z")

</div>

Hi MaxM,  
Thanks for your response.

Regarding your clarifying question, the output of the json.dumps function is the following:

```auto
jsonDumped = json.dumps(httpPatchOptions)

print(jsonDumped)
print(type(jsonDumped))

```

And the printed outputs are the following:

```auto
{"share_recording": "publicly", "recording_authentication": "false", "viewer_download": "false", "password": "1#F7*X9z", "on_demand": "false", "approval_type": 2, "send_email_to_host": "false", "show_social_share_buttons": "false"}
<class 'str'>

```

 ![screenshot_2021-06-22 10.17.11](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/a/9/a9dea0c11704b54749a7b704a48efd56416536d8.png)

In the next post, I will write all the Python code so that there is no missing info that I should hand in to you.

---

<div class="post-metadata">

**Author:** ![Lecture\_UnivT](https://avatars.discourse-cdn.com/v4/letter/l/f04885/32.png) [@Lecture\_UnivT](https://devforum.zoom.us/u/Lecture_UnivT)\
**Post date:** [June 22, 2021, 1:24am UTC](https://devforum.zoom.us/t/cannot-update-cloud-recording-setting-and-get-400-response/52536/9 "2021-06-22T01:24:47Z")

</div>

In addition to my reply above, I hereby attach the whole Python script (with an appropriate mask on the JTW thing)

```auto
import requests
import json

zoomAPI = "http://api.zoom.us"
meetingId = "w3ZSEyrzSCCwc0seSx2y6g=="

headers = {
    'authorization': "Bearer THISISSECRET",
    'content-type': "application/json"
    }

httpPatchOptions = {
  "share_recording": "publicly",
  "recording_authentication": "false",
  "viewer_download": "false",
  "password": "1#F7*X9z",
  "on_demand": "false",
  "approval_type": 2,
  "send_email_to_host": "false",
  "show_social_share_buttons": "false",
}

    
recordingSettingAPI = zoomAPI + "/v2/meetings/"+ meetingId + "/recordings/settings"
print(recordingSettingAPI, "\n")

r = requests.patch(recordingSettingAPI, data=json.dumps(httpPatchOptions), headers=headers)

jsonDumped = json.dumps(httpPatchOptions)
print(jsonDumped)
print(type(jsonDumped))

print("THIS IS THE ISSUE.--->", r)
print(r.content)

```

The printed outputs are the following:

```auto
http://api.zoom.us/v2/meetings/w3ZSEyrzSCCwc0seSx2y6g==/recordings/settings 

{"share_recording": "publicly", "recording_authentication": "false", "viewer_download": "false", "password": "1#F7*X9z", "on_demand": "false", "approval_type": 2, "send_email_to_host": "false", "show_social_share_buttons": "false"}
<class 'str'>
THIS IS THE ISSUE.---> <Response [400]>
b'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><error><code>300</code><message>Request Body should be a valid JSON object.</message></error>'

```

---

<div class="post-metadata">

**Author:** ![MaxM](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/maxm/32/42303_2.png) [@MaxM](https://devforum.zoom.us/u/MaxM)\
**Post date:** [June 23, 2021, 12:46am UTC](https://devforum.zoom.us/t/cannot-update-cloud-recording-setting-and-get-400-response/52536/10 "2021-06-23T00:46:17Z")

</div>

Hey @Lecture_UnivT,

Thank you for providing that information. I used the request body that you’re using but wasn’t able to see the same issue - even though boolean values are represented as strings. The request went through with a 204 response.

Please send an email to [developersupport@zoom.us](mailto:developersupport@zoom.us) with a link to this thread. In that email, I’ll continue my efforts to reproduce the issue and set up a meeting to troubleshoot live if necessary.

Thanks,  
Max

---

<div class="post-metadata">

**Author:** ![Lecture\_UnivT](https://avatars.discourse-cdn.com/v4/letter/l/f04885/32.png) [@Lecture\_UnivT](https://devforum.zoom.us/u/Lecture_UnivT)\
**Post date:** [June 23, 2021, 4:13am UTC](https://devforum.zoom.us/t/cannot-update-cloud-recording-setting-and-get-400-response/52536/11 "2021-06-23T04:13:39Z")

</div>

> [@MaxM](#):
>

Dear MaxM,  
Thanks for your kind reply.  
I have just sent an email to the email address.

I surely appreciate that I would get your advices via emails from now on.  
Thank you very much.

---

<div class="post-metadata">

**Author:** ![MaxM](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/maxm/32/42303_2.png) [@MaxM](https://devforum.zoom.us/u/MaxM)\
**Post date:** [June 24, 2021, 2:14am UTC](https://devforum.zoom.us/t/cannot-update-cloud-recording-setting-and-get-400-response/52536/12 "2021-06-24T02:14:50Z")

</div>

Hey @Lecture_UnivT,

Great! Thank you for submitting a ticket - I’ll follow up with you there.

Thanks,  
Max

---

<div class="post-metadata">

**Author:** ![MaxM](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/maxm/32/42303_2.png) [@MaxM](https://devforum.zoom.us/u/MaxM)\
**Post date:** [June 24, 2021, 2:14am UTC](https://devforum.zoom.us/t/cannot-update-cloud-recording-setting-and-get-400-response/52536/13 "2021-06-24T02:14:53Z")

</div>

Closed on June 24, 2021, 2:14am UTC


