This is a Node.js / Express server that generates a Web SDK signature via an http request from your frontend for use in the Web SDK.
If you would like to skip these steps and just deploy the finished code to Heroku, click the Deploy to Heroku button. (You will still need to configure a few simple things, so skip to Deployment.)
In terminal, run the following command to clone the repo:
$ git clone https://github.com/zoom/websdk-sample-signature-node.js.git
-
In terminal, cd into the cloned repo:
$ cd websdk-sample-signature-node.js
-
Then install the dependencies:
$ npm install
-
Create an environment file to store your API Key and Secret:
$ touch .env
-
Add the following code to the
.env
file, and insert your JWT App's API Key and Secret found on the App Crednetials page in the Zoom App Marketplace.:API_KEY=JWT_API_KEY_HERE API_SECRET=JWT_API_SECRET_HERE
-
Save and close
.env
. -
Start the server:
$ npm run start
Make a POST request to http://localhost:4000
(or your deployed url) with the following request body:
Body | Description |
---|---|
meetingNumber | The Zoom Meeting / Webinar Number. |
role | The role 0 to join the meeting or webinar, or 1 to start the meeting. |
POST http://localhost:4000
Request Body:
{
"meetingNumber": "123456789",
"role": 0
}
If successful, the response body will be a JSON representation of your signature:
{
"signature": "eHUzSlBhQV9SSlcyLTlsNV9IQWFMQS4xMjM0NTY3ODkuMTU4MzE2OTUzODc3My4wLkJMNEtiM3FINGx5ZzA1MUZtbGJOcGtPRnlFQS9lQUR2bGllVzJNNGZJeWs9"
}
In the Web SDK, pass in the signature
to the ZoomMtg.join()
object:
// make http request to your server to get the signature
ZoomMtg.join({
signature: signature,
meetingNumber: meetingNumber,
userName: userName,
apiKey: apiKey,
userEmail: userEmail,
passWord: password,
success: (success) => {
console.log(success)
},
error: (error) => {
console.log(error)
}
})
If you used the Deploy to Heroku button, enter a name for your app on the page the button took you to (or leave it blank to have a name generated for you), and fill in the values for these,
API_SECRET
(Your Zoom JWT App API Key, found on your Zoom JWT App Credentials page)API_KEY
(Your Zoom JWT App API Secret, found on your Zoom JWT App Credentials page)
Then click "Deploy App".
Now you can generate and use your signature via the deployed url Heroku provides.
If you cloned this repo, use the Heroku CLI to deploy your server.
-
In terminal, create a Heroku app:
$ heroku create
-
Add your files:
$ git add -A
-
Commit your files:
$ git commit -m "deploying to heroku"
-
Deploy your server by pushing your files to Heroku:
$ git push origin heroku
-
Navigate to your app on the Heroku dashboard, click settings, and add your JWT App Credentials in the Config Variables,
API_SECRET
(Your Zoom JWT App API Key, found on your Zoom JWT App Credentials page)API_KEY
(Your Zoom JWT App API Secret, found on your Zoom JWT App Credentials page)
Now you can generate and use your signature via the deployed url Heroku provides.
The first place to look for help is on our Developer Forum, where Zoom Marketplace Developers can ask questions for public answers.
If you can’t find the answer in the Developer Forum or your request requires sensitive information to be relayed, please email us at developersupport@zoom.us.