# Invalid acess token rest api with JWT

**URL:** <https://devforum.zoom.us/t/invalid-acess-token-rest-api-with-jwt/3430>\
**Category:** API and Webhooks\
**Created:** [February 28, 2019, 11:36pm UTC](https://devforum.zoom.us/t/invalid-acess-token-rest-api-with-jwt/3430 "2019-02-28T23:36:25Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![leesmith](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/leesmith/32/376_2.png) [@leesmith](https://devforum.zoom.us/u/leesmith)\
**Post date:** [February 28, 2019, 11:36pm UTC](https://devforum.zoom.us/t/invalid-acess-token-rest-api-with-jwt/3430/1 "2019-02-28T23:36:25Z")

</div>

Ok just stating out with the API but getting error code “124” =\> “Invalid access token”

I am using JWT for my Authorization, He is code gist.

> <https://gist.github.com/weblee/f5e24afd6e3ed28f276ad37e06834653>

Am I missing something?

---

<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:** [March 1, 2019, 3:50am UTC](https://devforum.zoom.us/t/invalid-acess-token-rest-api-with-jwt/3430/2 "2019-03-01T03:50:00Z")

</div>

Hi @leesmith,

Looking at your code things seem to be ok. Have you tried looking at our documentation to see how to properly generate your JWT[0].

0 - [https://marketplace.zoom.us/docs/guides/authorization/jwt/generating-jwt#generate-your-jwt-token-with-using-sever-side-code](https://marketplace.zoom.us/docs/guides/authorization/jwt/generating-jwt#generate-your-jwt-token-with-using-sever-side-code)

---

<div class="post-metadata">

**Author:** ![leesmith](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/leesmith/32/376_2.png) [@leesmith](https://devforum.zoom.us/u/leesmith)\
**Post date:** [March 1, 2019, 10:56am UTC](https://devforum.zoom.us/t/invalid-acess-token-rest-api-with-jwt/3430/3 "2019-03-01T10:56:00Z")

</div>

Hi Michael.

As you can see from the code it is server side.

Still same issue today. Any ideas?

---

<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:** [March 1, 2019, 3:12pm UTC](https://devforum.zoom.us/t/invalid-acess-token-rest-api-with-jwt/3430/4 "2019-03-01T15:12:11Z")

</div>

Hi @leesmith,

What API are you calling? With the same token that you’re generating with the php code, can you take the token and use it in postman or curl command to see if you’re getting the same error?

Thanks

---

<div class="post-metadata">

**Author:** ![leesmith](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/leesmith/32/376_2.png) [@leesmith](https://devforum.zoom.us/u/leesmith)\
**Post date:** [March 1, 2019, 3:53pm UTC](https://devforum.zoom.us/t/invalid-acess-token-rest-api-with-jwt/3430/5 "2019-03-01T15:53:20Z")

</div>

Hi Michael

I have tried taking the token from the credentials and used in postman.

> **[Screen Shot 2019-03-01 at 15.52.22.png](https://d.pr/i/YT3FwI)**
>
> Shared with Droplr

Same problem still

---

<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:** [March 1, 2019, 4:40pm UTC](https://devforum.zoom.us/t/invalid-acess-token-rest-api-with-jwt/3430/6 "2019-03-01T16:40:31Z")

</div>

Hi @leesmith,

Looks like it’s an invalid access token because you’re calling the accounts API. This API is for listing all subaccounts under a master account. Is the account you’re using a master account?

Also, to make sure the token is working can you try to use another API such as List users [https://marketplace.zoom.us/docs/api-reference/zoom-api/users/users](https://marketplace.zoom.us/docs/api-reference/zoom-api/users/users) ?

Thanks

---

<div class="post-metadata">

**Author:** ![leesmith](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/leesmith/32/376_2.png) [@leesmith](https://devforum.zoom.us/u/leesmith)\
**Post date:** [March 1, 2019, 4:46pm UTC](https://devforum.zoom.us/t/invalid-acess-token-rest-api-with-jwt/3430/7 "2019-03-01T16:46:49Z")

</div>

Hey @michael_p.zoom

Ok so pinging all users gives me a result.

I believe my account is master as its the first one?

Can you verify? [https://d.pr/i/ajfJUy](https://d.pr/i/ajfJUy)

---

<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:** [March 1, 2019, 8:19pm UTC](https://devforum.zoom.us/t/invalid-acess-token-rest-api-with-jwt/3430/9 "2019-03-01T20:19:09Z")

</div>

Hi @leesmith, master accounts means that you have created other sub-accounts. Usually to get a master account you have talked to someone within Zoom to get it. Have you done that already?
