# Always getting Invalid access token

**URL:** <https://devforum.zoom.us/t/always-getting-invalid-access-token/3334>\
**Category:** API and Webhooks\
**Created:** [February 20, 2019, 3:46pm UTC](https://devforum.zoom.us/t/always-getting-invalid-access-token/3334 "2019-02-20T15:46:12Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ryan.lang](https://avatars.discourse-cdn.com/v4/letter/r/e9c0ed/32.png) [@ryan.lang](https://devforum.zoom.us/u/ryan.lang)\
**Post date:** [February 20, 2019, 3:46pm UTC](https://devforum.zoom.us/t/always-getting-invalid-access-token/3334/1 "2019-02-20T15:46:12Z")

</div>

Hi,  
I’m trying to use the API using OAuth2. I’m trying use postman or /docs/api-reference/zoom-api/users/users which make a simple request to fetch users via “[api.zoom.us](http://api.zoom.us)”/v2/users I keep getting the invalid token error.

I generated a token using [https://jwt.io/](https://jwt.io/)

 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/1X/e11a5e5da003ed023cf667b42dde6b1e81f6deda.png)

But if I use a token from the application site, the request is successful

I rechecked the api secret and api key

I want to generate a token, and not to take it from the site.  
What should I do to get a valid token?

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:** [February 20, 2019, 5:08pm UTC](https://devforum.zoom.us/t/always-getting-invalid-access-token/3334/2 "2019-02-20T17:08:49Z")

</div>

Hi @ryan.lang,

When using the API with OAuth the authentication is different so you don’t need API key/secret, you only need your API Key/Secret when you’re trying to use JWT. Here are some docs for you to reference so that you can generate a valid OAuth token[1] or JWT API Key/Secret token[2]

1. API using Oauth - [https://marketplace.zoom.us/docs/guides/authorization/oauth-with-zoom/authentication-example](https://marketplace.zoom.us/docs/guides/authorization/oauth-with-zoom/authentication-example)

2. API using API/Key Secret - [https://marketplace.zoom.us/docs/guides/authorization/jwt/generating-jwt](https://marketplace.zoom.us/docs/guides/authorization/jwt/generating-jwt)

---

<div class="post-metadata">

**Author:** ![ryan.lang](https://avatars.discourse-cdn.com/v4/letter/r/e9c0ed/32.png) [@ryan.lang](https://devforum.zoom.us/u/ryan.lang)\
**Post date:** [February 20, 2019, 8:51pm UTC](https://devforum.zoom.us/t/always-getting-invalid-access-token/3334/3 "2019-02-20T20:51:21Z")

</div>

I trying to use JWT.

I generate a jwt token like this.

 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/1X/763b97448f37fd72206378325356c723b651440d.png)

But I geting the message that my token is not valid. Why is this happening? Key and secret are correct. And I noticed such a moment that the ‘payload’ when generating a token through the jwt site has fewer characters than the token that is generated through your site in the App Credentials section

---

<div class="post-metadata">

**Author:** ![sergeypastyshenko](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/sergeypastyshenko/32/322_2.png) [@sergeypastyshenko](https://devforum.zoom.us/u/sergeypastyshenko)\
**Post date:** [February 21, 2019, 9:21am UTC](https://devforum.zoom.us/t/always-getting-invalid-access-token/3334/4 "2019-02-21T09:21:53Z")

</div>

I have the same problem when I generating JWT.  
I also want to generate a token on the back on .net, even implemented the algorithm that is listed on [https://zoom.github.io/api/](https://zoom.github.io/api/). Even used libraries that generate jwt, but the result is one - invalid access token  
I took the API key and secret from here

 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/1X/04faa4c9b73adc9422815cf38d31e0e92219bfc6.png)

---

<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:** [February 21, 2019, 4:53pm UTC](https://devforum.zoom.us/t/always-getting-invalid-access-token/3334/5 "2019-02-21T16:53:33Z")

</div>

Hi @ryan.lang,

Can you email us a screenshot with what you’re inputing at jwt at [developersupport@zoom.us](mailto:developersupport@zoom.us) so that we can take a closer look?

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:** [February 21, 2019, 5:00pm UTC](https://devforum.zoom.us/t/always-getting-invalid-access-token/3334/6 "2019-02-21T17:00:08Z")

</div>

Hi @sergeypastyshenko,

Have you tried generating a JWT using the [jwt.io](http://jwt.io) site? Also please refer to this doc on how to generate a JWT for Zoom APIs [0]. Which JWT library are you using?

0 - [https://marketplace.zoom.us/docs/guides/authorization/jwt/generating-jwt#requirements-to-generate-your-jwt](https://marketplace.zoom.us/docs/guides/authorization/jwt/generating-jwt#requirements-to-generate-your-jwt)

---

<div class="post-metadata">

**Author:** ![DeveloperBot](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/developerbot/32/12632_2.png) [@DeveloperBot](https://devforum.zoom.us/u/DeveloperBot)\
**Post date:** [August 21, 2020, 6:11pm UTC](https://devforum.zoom.us/t/always-getting-invalid-access-token/3334/7 "2020-08-21T18:11:30Z")

</div>


