# Trying to update User Type field. Getting Unsupported Content Type

**URL:** <https://devforum.zoom.us/t/trying-to-update-user-type-field-getting-unsupported-content-type/36306>\
**Category:** API and Webhooks\
**Created:** [November 17, 2020, 9:41pm UTC](https://devforum.zoom.us/t/trying-to-update-user-type-field-getting-unsupported-content-type/36306 "2020-11-17T21:41:48Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![steven.n.vaughn](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/steven.n.vaughn/32/18930_2.png) [@steven.n.vaughn](https://devforum.zoom.us/u/steven.n.vaughn)\
**Post date:** [November 17, 2020, 9:41pm UTC](https://devforum.zoom.us/t/trying-to-update-user-type-field-getting-unsupported-content-type/36306/1 "2020-11-17T21:41:49Z")

</div>

**Description**  
Trying to update user ( PATCH /users/{userId}) Type (License (2) to Basic (1)) and getting

**Error**  
{“code”:300,“message”:“Unsupported Content Type”}

**Which App Type (OAuth / Chatbot / JWT / Webhook)?**  
JWT

**Which Endpoint/s?**

> **[Update a User - Users - Zoom API - API Reference](https://marketplace.zoom.us/docs/api-reference/zoom-api/users/userupdate)**
>
> Update information on a user's Zoom profile.
> Scopes: user:write:admin user:write
> 
> Rate Limit Label: Light
> 
> Authorization
> 
> Flow: authorizationCode
> 
> Auth...

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

p

**Screenshots (If applicable)**

{ “type”: 1 }  
[https://api.zoom.us/v2/users/vy5NdVA3S9Ca5OTdZP8ngA](https://api.zoom.us/v2/users/vy5NdVA3S9Ca5OTdZP8ngA)  
Invoke-WebRequest: C:\Users\svaughn\Desktop\Zoom Licenses-20201117T183041Z-001\Zoom Licenses\demote-candidates.ps1:18:17  
Line |  
18 | … $response = Invoke-WebRequest -Uri $url -Headers $headers -Method Pat …  
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  
| {“code”:300,“message”:“Unsupported Content Type”}

---

<div class="post-metadata">

**Author:** ![will.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/will.zoom/32/14417_2.png) [@will.zoom](https://devforum.zoom.us/u/will.zoom)\
**Post date:** [November 18, 2020, 9:15pm UTC](https://devforum.zoom.us/t/trying-to-update-user-type-field-getting-unsupported-content-type/36306/2 "2020-11-18T21:15:09Z")

</div>

Hey @steven.n.vaughn,

A few things to check:

- Can you make sure you’re using the correct HTTP method (POST) for creating a user?
- Ensure the content type for your request body is JSON
- Check that you’re passing a header for `Content-Type` with value `application/json`

Let me know if this helps!

Best,  
Will

---

<div class="post-metadata">

**Author:** ![steven.n.vaughn](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/steven.n.vaughn/32/18930_2.png) [@steven.n.vaughn](https://devforum.zoom.us/u/steven.n.vaughn)\
**Post date:** [November 19, 2020, 3:09pm UTC](https://devforum.zoom.us/t/trying-to-update-user-type-field-getting-unsupported-content-type/36306/3 "2020-11-19T15:09:18Z")

</div>

Thanks for responding Will

I am trying to Update information on a user’s Zoom … To be specific. I am trying to update the Type value to change some users from licensed to basic (2 to 1).

This is the api documentation page I am trying to use: [https://marketplace.zoom.us/docs/api-reference/zoom-api/users/userupdate](https://marketplace.zoom.us/docs/api-reference/zoom-api/users/userupdate)

I am able to get user information, so I have worked though the jwt and header specifications:T

> $headers = @{  
> “Accept”=“application/json”  
> “Authorization”=“Bearer $jwt”  
> }

The api page specifies the PATCH http verb be used, but I tried POST as you suggested, and I get the same :

> {“code”:300,“message”:“Unsupported Content Type”}

The URL I am using is:

> [https://api.zoom.us/v2/users/GUT77j3kThSUBUWPPqRZyw](https://api.zoom.us/v2/users/GUT77j3kThSUBUWPPqRZyw)

The body I am presenting is:

> { “type”: 1 }

The powershell statement I use to make the call is:

> $response = Invoke-WebRequest -Uri $url -Headers $headers -Method PATCH -Body $body

> or  
> $response = Invoke-WebRequest -Uri $url -Headers $headers -Method Post -Body $body

The response I get is:

> Invoke-WebRequest: C:\Users\svaughn\Desktop\Zoom Licenses\demote-candidates.ps1:18:17  
> Line |  
> 18 | … $response = Invoke-WebRequest -Uri $url -Headers $headers -Method Pat …
> 
> > ```auto
> > {"code":300,"message":"Unsupported Content Type"}
> > 
> > ```

I add the Content-Type header as you suggested:

> $headers = @{  
> “Accept”=“application/json”  
> “Authorization”=“Bearer $jwt”  
> “Content-Type”=“application/json”  
> }

Now get a different response:

---

<div class="post-metadata">

**Author:** ![will.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/will.zoom/32/14417_2.png) [@will.zoom](https://devforum.zoom.us/u/will.zoom)\
**Post date:** [November 20, 2020, 9:34pm UTC](https://devforum.zoom.us/t/trying-to-update-user-type-field-getting-unsupported-content-type/36306/4 "2020-11-20T21:34:45Z")

</div>

Hey @steven.n.vaughn,

My apologies—I did not catch that you’re trying to update rather than create. You’re correct in that you should be using a PATCH request for Update User requests.

It looks like your final sentence got cut off unfortunately. Have you tried submitting this request in Postman to see if you get the same error? Your request should look something like this:

 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/3/4/34d7af2b4316271457ec04e58fad7de2f415aa0b.png)

Let me know, thanks!  
Will

---

<div class="post-metadata">

**Author:** ![steven.n.vaughn](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/steven.n.vaughn/32/18930_2.png) [@steven.n.vaughn](https://devforum.zoom.us/u/steven.n.vaughn)\
**Post date:** [November 21, 2020, 10:48am UTC](https://devforum.zoom.us/t/trying-to-update-user-type-field-getting-unsupported-content-type/36306/5 "2020-11-21T10:48:29Z")

</div>

Thanks for your help Will.

Your first note was right on the money actually. You suggested “Check that you’re passing a header for Content-Type with value application/json”

That was necessary.

And it led me to question another header I was using. Once I removed the header “Accept” “application/json” it worked.

Steve

---

<div class="post-metadata">

**Author:** ![will.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/will.zoom/32/14417_2.png) [@will.zoom](https://devforum.zoom.us/u/will.zoom)\
**Post date:** [November 23, 2020, 10:23pm UTC](https://devforum.zoom.us/t/trying-to-update-user-type-field-getting-unsupported-content-type/36306/6 "2020-11-23T22:23:46Z")

</div>

I’m glad to hear that did the trick, @steven.n.vaughn!

Best,  
Will

---

<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:** [December 24, 2020, 8:23am UTC](https://devforum.zoom.us/t/trying-to-update-user-type-field-getting-unsupported-content-type/36306/7 "2020-12-24T08:23:56Z")

</div>

Closed on December 24, 2020, 8:23am UTC

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