PATCH User Setting with Python returning 415

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:

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.

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

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