# Distinguish between multiple Zoom accounts in an OAuth App

**URL:** <https://devforum.zoom.us/t/distinguish-between-multiple-zoom-accounts-in-an-oauth-app/6211>\
**Category:** API and Webhooks\
**Created:** [October 10, 2019, 9:21am UTC](https://devforum.zoom.us/t/distinguish-between-multiple-zoom-accounts-in-an-oauth-app/6211 "2019-10-10T09:21:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tsykul](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tsykul/32/2069_2.png) [@tsykul](https://devforum.zoom.us/u/tsykul)\
**Post date:** [October 10, 2019, 9:21am UTC](https://devforum.zoom.us/t/distinguish-between-multiple-zoom-accounts-in-an-oauth-app/6211/1 "2019-10-10T09:21:42Z")

</div>

Hi! I’m developing an account level OAuth Zoom app that is going to be used by multiple customers each having their own account.

The OAuth callback only receives the authorization code. Each customer will then send their authorization code after authorizing the app, but what is the best way to link the code to an account id? Is there an API endpoint I could use for that?

Thanks.

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [October 10, 2019, 8:36pm UTC](https://devforum.zoom.us/t/distinguish-between-multiple-zoom-accounts-in-an-oauth-app/6211/2 "2019-10-10T20:36:55Z")

</div>

Hey @tsykul, thanks for posting, and building on the Zoom platform! 🙂

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 save the `access_token`, `refresh_token`, and expires date to a database with the `accountId` as the primary key.

Does that make sense?

Thanks,  
Tommy

---

<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:44pm UTC](https://devforum.zoom.us/t/distinguish-between-multiple-zoom-accounts-in-an-oauth-app/6211/3 "2020-08-21T18:44:41Z")

</div>

Closed on August 21, 2020, 6:44pm UTC


