# JWT or OAuth

**URL:** <https://devforum.zoom.us/t/jwt-or-oauth/1653>\
**Category:** API and Webhooks\
**Created:** [August 20, 2018, 3:19pm UTC](https://devforum.zoom.us/t/jwt-or-oauth/1653 "2018-08-20T15:19:57Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dayal\_Gaitonde](https://avatars.discourse-cdn.com/v4/letter/d/a8b319/32.png) [@Dayal\_Gaitonde](https://devforum.zoom.us/u/Dayal_Gaitonde)\
**Post date:** [August 20, 2018, 3:19pm UTC](https://devforum.zoom.us/t/jwt-or-oauth/1653/1 "2018-08-20T15:19:57Z")

</div>

I am&nbsp;able to successfully use APIs when using the token generated by using API Key/Secret from the Developer console (JWT), but&nbsp;am unable to use those same APIs when using an OAuth access token generated for an admin user. I’m using curl in the following format -&nbsp;

&nbsp;

&nbsp;

&nbsp;

&nbsp;

```
curl -X GET -H "Authorization: Bearer {token}" https://api.zoom.us/v2/users

```

I’m getting the error message -&nbsp;

```
{"code":124,"message":"Invalid access token, does not contain scopes: [user:write:admin, user:read:admin]"}

```

Other APIs that work when using the JWT Token but not w/ the OAuth Token -

- 

```
GET https://api.zoom.us/v2/users/{userId}

```

- 

```
GET https://api.zoom.us/v2/users/{userId}/settings

```

- 

```
GET https://api.zoom.us/v2/users/{userId}/meetings ({"code":124,"message":"Invalid access token, does not contain scopes: [meeting:read:admin, meeting:write:admin]"})

```

- 

```
GET https://api.zoom.us/v2/users/{userId}/recordings ({"code":124,"message":"Invalid access token, does not contain scopes: [recording:write:admin, recording:read:admin]")

```

The only API that I’ve found that works with both tokens is -&nbsp;

- 

```
GET https://api.zoom.us/v2/users/me

```

Appreciate any insight on why there might be a difference or things to try. Thanks.

---

<div class="post-metadata">

**Author:** ![michael\_p.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael_p.zoom/32/18105_2.png) [@michael\_p.zoom](https://devforum.zoom.us/u/michael_p.zoom)\
**Post date:** [August 20, 2018, 5:03pm UTC](https://devforum.zoom.us/t/jwt-or-oauth/1653/2 "2018-08-20T17:03:31Z")

</div>

Hi Dayal ,&nbsp;

You will have to register you app with out [marketplace](https://marketplace.zoom.us/). From there you can use&nbsp;select the [scopes](https://devdocs.zoom.us/docs/permissions) to get access to our APIs via OAuth. To get started with our marketplace you can visit [here](https://devdocs.zoom.us/docs/introduction).

Thanks&nbsp;

---

<div class="post-metadata">

**Author:** ![Dayal\_Gaitonde](https://avatars.discourse-cdn.com/v4/letter/d/a8b319/32.png) [@Dayal\_Gaitonde](https://devforum.zoom.us/u/Dayal_Gaitonde)\
**Post date:** [August 20, 2018, 5:20pm UTC](https://devforum.zoom.us/t/jwt-or-oauth/1653/3 "2018-08-20T17:20:07Z")

</div>

Thanks for the response Michael, but the Client ID/Secret I’m&nbsp;using&nbsp;are from an app I created on the marketplace.&nbsp;For testing purposes, I’ve selected \_ **all** \_ the scopes and still have the same issues.

---

<div class="post-metadata">

**Author:** ![michael\_p.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael_p.zoom/32/18105_2.png) [@michael\_p.zoom](https://devforum.zoom.us/u/michael_p.zoom)\
**Post date:** [August 21, 2018, 7:09pm UTC](https://devforum.zoom.us/t/jwt-or-oauth/1653/4 "2018-08-21T19:09:08Z")

</div>

Hi Dayal,&nbsp;

How are you making the OAuth calls, are you using the access token to access the APIs? Would you be able to share the request/response payload flow?&nbsp;

---

<div class="post-metadata">

**Author:** ![Dayal\_Gaitonde](https://avatars.discourse-cdn.com/v4/letter/d/a8b319/32.png) [@Dayal\_Gaitonde](https://devforum.zoom.us/u/Dayal_Gaitonde)\
**Post date:** [August 21, 2018, 7:28pm UTC](https://devforum.zoom.us/t/jwt-or-oauth/1653/5 "2018-08-21T19:28:15Z")

</div>

Hi Michael,&nbsp;

In my original post I mentioned that I’m using curl, but I’ve also&nbsp;in other channels&nbsp;(Postman, app code, etc). The app has been created in the marketplace and I am authorizing using a Zoom admin user. Here is a specific example that does not work for me -&nbsp;

```
curl -X GET -H "Authorization: Bearer {token}" https://api.zoom.us/v2/users/\<adminUserEmail\>/settings

```

and this&nbsp;is the response I get -&nbsp;

```
{"code":124,"message":"Invalid access token, does not contain scopes: [user:write:admin, user:read:admin]"}  

```

Note, the same token is used successfully used on the “me” endpoint -&nbsp;

```
curl -X GET -H "Authorization: Bearer {token}" https://api.zoom.us/v2/users/me

```

this returns the expected user json.

---

<div class="post-metadata">

**Author:** ![michael\_p.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael_p.zoom/32/18105_2.png) [@michael\_p.zoom](https://devforum.zoom.us/u/michael_p.zoom)\
**Post date:** [August 21, 2018, 8:23pm UTC](https://devforum.zoom.us/t/jwt-or-oauth/1653/6 "2018-08-21T20:23:07Z")

</div>

Hi Dayal,&nbsp;

Can you send your access token/refresh token and a screenshot of the scopes you selected to [developersupport@zoom.us](mailto:developersupport@zoom.us)? From there we can take an in-depth look at the issue.&nbsp;

Thanks

---

<div class="post-metadata">

**Author:** ![Dayal\_Gaitonde](https://avatars.discourse-cdn.com/v4/letter/d/a8b319/32.png) [@Dayal\_Gaitonde](https://devforum.zoom.us/u/Dayal_Gaitonde)\
**Post date:** [August 21, 2018, 9:35pm UTC](https://devforum.zoom.us/t/jwt-or-oauth/1653/7 "2018-08-21T21:35:13Z")

</div>

Email sent. Thanks.
