Use of this sample app is subject to our Terms of Use
This is a Hello World app using an OAuth Marketplace App client ID and Secret to create an OAuth token, used to call the Zoom API.
Follow allong with relevant Zoom OAuth documentation as we set this up:
Clone and install the app and it's dependencies. We'll be using Express for a basic Node.js server, dotenv for our credentials, requests to make HTTP requests and nodemon for easier development refreshing.
git clone https://github.com/zoom/zoom-oauth-sample-app.git
cd zoom-oauth-sample-app && npm install
Run server:
npm run start
Create a .env
file in which to store your PORT, access credentials, and Redirect URL.
touch .env
Copy the following into this file, which we'll add your own values to:
clientID=
clientSecret=
redirectURL=
Remember: Never share or store your client credentials publicly. Your
.env
is included in the.gitignore
file to ensure these files won't be included in a git workflow.
Install ngrok
During the OAuth flow, Zoom will need to know where to redirect a user after they have successfully authenticated and installed the app on their account.
For this we'll use ngrok, which creates a public link to a localhost development server.
Download and install ngrok, then follow the steps to connect your account.
Run ngrok on the same localhost port (4000):
~/./ngrok http 4000
This will generate a forwarding link. Copy this and add it into your .env
file as the redirectURL
. Keep ngrok running! If the linkage disconnects, we'll need to readd a new redirectURL.
Example:
redirectURL=https://12345678.ngrok.io
Sign in to the Zoom App Marketplace and Create an OAuth App.
Creating this app will generate your OAuth Client ID and Secret needed to install on your account and get an access token.
Copy these credentials and add them to your .env
file.
Example:
clientID=1234567890
clientSecret=13245678901234567890
redirectURL=https://12345678.ngrok.io
Copy and paste your ngrok link into the Redirect URL for OAuth field, then click Continue.
To install the app, we'll need to add some quick info on the app. Add in the following:
- Short Description
- Long Description
- Developer Name
- Developer Contact
We won't need to add any Features to our app, but if we wanted to enable Event Subscriptions through Zoom Webhooks, we'd do it here.
OAuth is used to guarantee that an app only has access to the data you authorize. If an app does not have the required scope, it cannot call the API on your behalf.
To request data,we'll need to add a Scope to our app. The only data we need is for a user's profile information. Click + Add Scopes and add "View your user information" (user:read
). Click Done and continue on to the Installation page.
With our app running on localhost:4000
, a live redirectURL from ngrok, and proper scopes requested we can now install the app on our account.
Click Install or copy the Installation URL into a browser.
Zoom will now ask you to authorize the app on your account. Note that the app is requesting only the scope we've added.
If you're not the admin on your Zoom account, the admin might require you to ask them for pre-approval to install this app. Submit a request to get this pre-approved by your account admin.
Authorizing the app will send you to the Redirect URL of your app, linked to our app running on localhost:4000.
Your express server will log your access_token, refresh_token and the API call response to get your user information.
In your browser, you'll see your Zoom profile data, with a JSON object showing the response. This API request was made using an access_token
specific to this app and scopes.
Follow our documentation on OAuth with Zoom for more information on building a user-level app on the Zoom App Marketplace.
Code happy!
If you're looking for help, try Developer Support or our Developer Forum. Priority support is also available with Premier Developer Support plans.