# 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:** 1\
**Showing post:** 2

<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

---

_[View the full topic](https://devforum.zoom.us/t/distinguish-between-multiple-zoom-accounts-in-an-oauth-app/6211)._
