This repository is a sample application that demonstrates how to:
- Generate a server to server OAuth Token
- Open a Websocket Connection
- Store the received websocket payload to redis database
Before running the application, make sure you have the following requirements:
- Node.js installed on your computer
- A Zoom account
- Server to server Oauth app with Websocket Configured ( required to get these credentials: client ID, client secret, account ID, user ID, subscription ID)
- Redis server installed and running on your machine
Follow these steps to install and set up the application:
-
Clone the repository:
git clone https://github.com/zoom/websocket-redis-example
-
Go to the project directory:
cd Zoom-Websocket-Redis-Example
-
Install the dependencies:
npm install
-
Configure the environment variables by creating a
.env
file in the main directory and adding the necessary values:clientID=YOUR_CLIENT_ID clientSecret=YOUR_CLIENT_SECRET account_id=YOUR_ACCOUNT_ID subscription_id=YOUR_SUBSCRIPTION_ID
Remember to replace
YOUR_CLIENT_ID
,YOUR_CLIENT_SECRET
,YOUR_ACCOUNT_ID
, andYOUR_SUBSCRIPTION_ID
with the actual values from your Server to server OAuth app.
To start the application, follow these steps:
-
Start the application:
npm start
The console will display the access token, user information, WebSocket connection status.
-
Whenever you trigger the event that you have subscribed in the zoom app (for example meeting created / updated / deleted), you can see the payload in your console.
-
Verify that the received event data is logged in the console and stored successfully in your redis database, as indicated by the output messages.