Distinguish between multiple Zoom accounts in an OAuth App

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.

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}

(docs: https://marketplace.zoom.us/docs/guides/authorization/oauth/oauth-with-zoom#request-access-token) and JWT decode/parse 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

1 Like