# How to get the correct access token through a webhook metadata

**URL:** <https://devforum.zoom.us/t/how-to-get-the-correct-access-token-through-a-webhook-metadata/73140>\
**Category:** Cloud Recordings\
**Tags:** faq\
**Created:** [July 28, 2022, 8:58am UTC](https://devforum.zoom.us/t/how-to-get-the-correct-access-token-through-a-webhook-metadata/73140 "2022-07-28T08:58:59Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![escape813](https://avatars.discourse-cdn.com/v4/letter/e/5fc32e/32.png) [@escape813](https://devforum.zoom.us/u/escape813)\
**Post date:** [July 28, 2022, 8:58am UTC](https://devforum.zoom.us/t/how-to-get-the-correct-access-token-through-a-webhook-metadata/73140/1 "2022-07-28T08:58:59Z")

</div>

I have the same questions, [https://devforum.zoom.us/t/account-level-app-get-account-id/33320](https://devforum.zoom.us/t/account-level-app-get-account-id/33320),  
"I have an account level oauth app. The idea is this app gets webhooks from different accounts.

When I get a webhook I want to use the access token to do something.

In order to do that I need to know which access token to use based on the account id in the webhook."  
For example, when a recording completed event come, I’ll get the meeting id, I want to get the meeting detail, so I need to call [https://api.zoom.us/v2/meetings/{meetingId}](https://api.zoom.us/v2/meetings/%7BmeetingId%7D) with Bearer token, but how do I find the access token through the webhook metadata?(The admin authorized our App, I’ll get the access token, but I can’t get the corresponding access token to this event)  
Many thanks！

---

<div class="post-metadata">

**Author:** ![gianni.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/gianni.zoom/32/32523_2.png) [@gianni.zoom](https://devforum.zoom.us/u/gianni.zoom)\
**Post date:** [July 28, 2022, 10:55am UTC](https://devforum.zoom.us/t/how-to-get-the-correct-access-token-through-a-webhook-metadata/73140/2 "2022-07-28T10:55:43Z")

</div>

Hi @escape813 ,

We do not officially support the process you’re attempting. Access tokens are not available via webhook by design, but here’s a way to retrieve them to match to account id during initial authorization:

> [@Distinguish between multiple Zoom accounts in an OAuth App](https://devforum.zoom.us/t/distinguish-between-multiple-zoom-accounts-in-an-oauth-app/6211/2):
>
> Hey @tsykul, thanks for posting, and building on the Zoom platform! slight_smile The best way to link OAuth to an account id is to save the access\_token, refresh\_token, and expires date you get from: POST [https://zoom.us/oauth/token?grant\_type=authorization\_code&redirect\_uri={your\_redirect\_uri}&code={authorization\_code}](https://zoom.us/oauth/token?grant_type=authorization_code&redirect_uri=%7Byour_redirect_uri%7D&code=%7Bauthorization_code%7D) (docs: [https://marketplace.zoom.us/docs/guides/authorization/oauth/oauth-with-zoom#request-access-token](https://marketplace.zoom.us/docs/guides/authorization/oauth/oauth-with-zoom#request-access-token)) and [JWT decode/parse](https://jwt.io/) the access\_token to get the account id. Then s…

Hope this helps!

---

<div class="post-metadata">

**Author:** ![escape813](https://avatars.discourse-cdn.com/v4/letter/e/5fc32e/32.png) [@escape813](https://devforum.zoom.us/u/escape813)\
**Post date:** [July 29, 2022, 2:04am UTC](https://devforum.zoom.us/t/how-to-get-the-correct-access-token-through-a-webhook-metadata/73140/3 "2022-07-29T02:04:49Z")

</div>

Thanks for your help. I have another question, about the definition of the account id, any user in zoom account is one account id, or any user in zoom account has a different account id?

---

<div class="post-metadata">

**Author:** ![escape813](https://avatars.discourse-cdn.com/v4/letter/e/5fc32e/32.png) [@escape813](https://devforum.zoom.us/u/escape813)\
**Post date:** [July 29, 2022, 6:18am UTC](https://devforum.zoom.us/t/how-to-get-the-correct-access-token-through-a-webhook-metadata/73140/4 "2022-07-29T06:18:09Z")

</div>

I know from practice that the account ID of the event of the user under the same account is the same . So an account has only a unique account ID, is that right?

---

<div class="post-metadata">

**Author:** ![gianni.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/gianni.zoom/32/32523_2.png) [@gianni.zoom](https://devforum.zoom.us/u/gianni.zoom)\
**Post date:** [August 2, 2022, 4:29pm UTC](https://devforum.zoom.us/t/how-to-get-the-correct-access-token-through-a-webhook-metadata/73140/5 "2022-08-02T16:29:55Z")

</div>

Hi @escape813 , yes this is correct. Any user under the same account will have the same account id. They will have different user ids.

---

<div class="post-metadata">

**Author:** ![escape813](https://avatars.discourse-cdn.com/v4/letter/e/5fc32e/32.png) [@escape813](https://devforum.zoom.us/u/escape813)\
**Post date:** [August 3, 2022, 9:07am UTC](https://devforum.zoom.us/t/how-to-get-the-correct-access-token-through-a-webhook-metadata/73140/6 "2022-08-03T09:07:45Z")

</div>

Thanks very much. I know what I gotta do
