# PATCH User Setting with Python returning 415

**URL:** <https://devforum.zoom.us/t/patch-user-setting-with-python-returning-415/83799>\
**Category:** API and Webhooks\
**Tags:** api\
**Created:** [February 27, 2023, 4:47pm UTC](https://devforum.zoom.us/t/patch-user-setting-with-python-returning-415/83799 "2023-02-27T16:47:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nbecirovic](https://avatars.discourse-cdn.com/v4/letter/n/9d8465/32.png) [@nbecirovic](https://devforum.zoom.us/u/nbecirovic)\
**Post date:** [February 27, 2023, 4:47pm UTC](https://devforum.zoom.us/t/patch-user-setting-with-python-returning-415/83799/1 "2023-02-27T16:47:37Z")

</div>

I’m having issue where I’m just trying to update users setting to set feature for zoom\_phone to true. Here is my Python code:

```auto
import requests
import json

myToken = 'Bearer token'
myUrl = 'https://api.zoom.us/v2/users/usedID/settings'
head = {'Authorization': myToken}

payload = {
  "feature": {
    "zoom_phone" : "true"
  }
}

r = requests.patch(myUrl, payload, headers=head)

print(r.status_code)

```

I keep getting back 415 which is indicating issue with the payload but I don’t see where the issue is. I send same payload via Postman and it works fine.

---

<div class="post-metadata">

**Author:** ![elisa.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/elisa.zoom/32/47836_2.png) [@elisa.zoom](https://devforum.zoom.us/u/elisa.zoom)\
**Post date:** [February 28, 2023, 7:29pm UTC](https://devforum.zoom.us/t/patch-user-setting-with-python-returning-415/83799/2 "2023-02-28T19:29:35Z")

</div>

Hi @nbecirovic  
Thanks for reaching out to the Zoom Developer forum, I am happy to help here!  
It looks like you are not passing the proper “content\_type” in your request.  
Make sure to pass “Content\_type”: “application/json” when you are sending data to any of our endpoints.

Hope this helps  
Elisa

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [March 3, 2024, 11:05am UTC](https://devforum.zoom.us/t/patch-user-setting-with-python-returning-415/83799/3 "2024-03-03T11:05:49Z")

</div>

Closed on March 3, 2024, 11:05am UTC

This topic was automatically closed 368 days after the last reply. New replies are no longer allowed.
