This repository contains a Node.js application that allows you to create a Zoom Team Chat App for managing recordings. Follow the instructions below to set up and run the application. This example is used to mainly demonstrate: **a. Message Shortcut b. Compose box shortcut ** This example also demonstrates: a. Chatbot token generation b. Sending Chatbot messages c. Generating Zoom OAuth Access token and Refresh token d. Making Zoom API calls (Recordings Endpoint)
If you want to know just about Message Shortcut and compose box shortcut, please ignore the following files:
Before running the code, make sure you have the following libraries installed:
- Node.js
- Express.js
- axios
- helmet
- crypto-js
- zoom-apps-sdk (npm install @zoom/appssdk)
- Clone the repository to your local machine.
git clone https://github.com/ojusave/zoom-recordings-team-chat-app
- Install the required dependencies.
npm install
- Create a
.env
file in the root directory of your local repository and add the following details from your Zoom Team Chat App:
zoom_client_id=YOUR_CLIENT_ID
zoom_client_secret=YOUR_CLIENT_SECRET
zoom_bot_jid=YOUR_BOT_JID
zoom_verification_token=YOUR_VERIFICATION_TOKEN
redirect_uri=YOUR_REDIRECT_URI
Replace YOUR_CLIENT_ID
, YOUR_CLIENT_SECRET
, YOUR_BOT_JID
, YOUR_VERIFICATION_TOKEN
, and YOUR_REDIRECT_URI
with the corresponding values from your Zoom Team Chat App.
To run the code, navigate to the zoom-recordings-team-chat-app
directory and start the Node.js server.
cd zoom-recordings-team-chat-app
npm run start
Make sure the server is running successfully.
-
Create a Team Chat Apps using the guidelines provided here.
-
Enable the App Shortcuts in the Zoom Marketplace configuration.
-
Click on "Add Shortcuts" and provide an "Action Name" and "Action Command ID" for each action you want to create. This code demonstrates two actions:
- Send Message Preview: To demonstrate the message Preview functionality from a Compose Box and Message Action.
- Find Recordings: To demonstrate sending a message from a Compose Box and Message Action.
Depending on what your command is, you may want to change them here: const routeHandlers = { 'SendMessagePreview': (req, res) => { res.sendFile(SEND_PREVIEW_HTML_PATH); }, 'findrecordings': (req, res) => { res.sendFile(WEBVIEW_HTML_PATH); } };
-
Save the configuration.
-
Enable the "Display on Zoom Client" option and provide the "Home URL" for development and production environments. These URLs will be used to invoke the web view when you click on the message action or compose box.
-
Add your domain to the allow list along with "appssdk.zoom.us".
-
Click on "Add API" and select the following API scopes:
- getRunningContext
- openUrl
- composeCard
- getChatContext
- getAppContext
- composeText
- getComposeContext
Click "Continue".
-
In the scopes section, click on "Add Scopes" and add the following recordings scopes:
- View all user recordings:
/recording:read:admin
- View and manage all user recordings:
/recording:write:admin
- View all user recordings:
-
Save the configuration.
-
Authorize the app by clicking on the local test or publishable URL, depending on the credentials you have selected. This will allow you to see the bot in your Zoom client.
-
To get the recordings, use the following command in a chat:
/"your command" YYYY-MM-DD, YYYY-MM-DD (from and to dates)
-
You will also see compose box and message actions options from the app in your Zoom client.
-
Clicking on them will invoke the web view.
-
Selecting "Find Recordings"