Coder Social home page Coder Social logo

tsublette / websdk-sample-signature-node.js Goto Github PK

View Code? Open in Web Editor NEW

This project forked from zoom/meetingsdk-auth-endpoint-sample

0.0 1.0 0.0 16 KB

Genrerate a signature to Start and Join Meetings and Webinars with the Zoom Web SDK.

JavaScript 100.00%

websdk-sample-signature-node.js's Introduction

Zoom Web SDK Sample Signature Node.js

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.)

Deploy

Installation

In terminal, run the following command to clone the repo:

$ git clone https://github.com/zoom/websdk-sample-signature-node.js.git

Setup

  1. In terminal, cd into the cloned repo:

    $ cd websdk-sample-signature-node.js

  2. Then install the dependencies:

    $ npm install

  3. Create an environment file to store your API Key and Secret:

    $ touch .env

  4. 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
    
  5. Save and close .env.

  6. Start the server:

    $ npm run start

Usage

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.

Example Request

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)
  }
})

Deployment

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.

  1. In terminal, create a Heroku app:

    $ heroku create

  2. Add your files:

    $ git add -A

  3. Commit your files:

    $ git commit -m "deploying to heroku"

  4. Deploy your server by pushing your files to Heroku:

    $ git push origin heroku

  5. 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.

Need Support?

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 [email protected].

websdk-sample-signature-node.js's People

Contributors

tommygaessler avatar michaelpurnellzoom avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.