Skip to content

ShenpaiSharma/Zoom-jwt-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

To Develop and run the code

  • Zoom reference code, which I have created using the Zoom-API-reference to get the analytics data.
npm install
npm start
  • check it's request.rest file for the API response after adding REST Client extension in VS Code or use Postman to test the API.

API Endpoints

GET-- {baseURL}/user :

  • A Zoom account can have one or more users. Use this API to list users on your account.

GET-- {baseURL}/user/report :

-Retrieve report on past meetings and webinars for a specified time period. The time range for the report is limited to a month and the month must fall within the past six months.

  • Meetings and webinars are returned only if they have two or more unique participants.
  • It will give statistical report data

POST-- {baseURL}/signin :

  • It will retrieve the information of particular user linked to host zoom id. We can use as the sign in as it will allow access only a particular user is present in host user list.

GET-- {baseURL}/user/meetingreport/:id :

  • Get a detailed report for a past meeting.

POST-- {baseURL}/user/createuser

  • A Zoom account can have one or more users. Use this API to add a new user to your account.
  • It will send the email to the new user by the host email id to get added in the list of user in host Zoom account.

GET-- {baseURL}/user/meetings

  • List all the meetings that were scheduled for a user (meeting host). This API only supports scheduled meetings and thus, details on instant meetings are not returned via this API.

Response Status Code:

  • 200: Return the average_day data
  • 404: When user_id does not match. ({ message: 'User not found' }
  • 500: Internal Server Error

POST-- {baseURL}/user/createmeeting

  • For a user this API has a daily rate limit of 100 requests per day. Therefore, only 100 Create a Meeting API requests are permitted within a 24 hour window for a user.
  • The start_url of a meeting is a URL using which a host or an alternative host can start a meeting. The expiration time for the start_url field is two hours for all regular users.
  • For custCreate meeting hosts( i.e., users created using the custCreate option via the Create Users API), the expiration time of the start_url field is 90 days from the generation of the start_url.

DELETE -- {baseURL}/user/logout

Delete all the refresh token generated by user after logging any user out. It will protect from other to retrieve access token of user to get access of user’s information.

Make Zoom API call using JWT

With this app, you can learn how to generate JWT and use the JWT to authenticate and make a Zoom API call. Follow the steps below to install the app and run it on your computer.

Getting Started

Install

Clone the repo using git clone. git clone https://github.com/zoom/zoom-api-jwt.git

Install the dependent node modules.

The app requires the following modules:

jsonwebtoken : Provides a way to generate JWT with jwt.sign() method. request-promise: Provides a way to Request call objects with .then() method. express: Web application framework for Node.js.

To install these dependencies in your project directory, type npm-install <module-name> in your terminal.

Quick Start

To generate JWT, you have to provide your API Key and API Secret credentials. You can locate these credentials in your app’s configuration by going to Zoom Marketplace > Manage > > App Credentials. If you haven’t already registered your app in the marketplace, you will have to create an app here to get your credentials. For the purpose of this sample app, you only need your credentials and you do not have to fill out any additional information while registering the app.

In the config.js file, input your client API Key & Secret credentials.

	const config = {
	production:{	
		APIKey : 'Your environment API Key',
		APISecret : 'Your environment API Secret'
	}
    };

Set your environment varaibles. export NODE_NEV=[environment name] (e.g. export NODE_NEV=production)

Start the node app. Type node index.js in your terminal from within the project directory.

Enter your email and view the API's response. When you run the app, you will see a form that asks for an email address. Provide your Zoom email address and you will see your JWT and other information related to your account.

The following code snippet generates the JWT using your Client Credentials:

    const payload = {
    iss: config.APIKey,
    exp: ((new Date()).getTime() + 5000)
};
	const token = jwt.sign(payload, config.APISecret);

After you submit an email address, it will post the entered information and the email will be used to make a Retrieve User Zoom API call and you will be redirected to localhost:3000/userinfo page that displays the API response - information related to the user. This is achieved through an HTTP POST method. You can make API calls to other ZOOM endpoints by replacing the uri shown in the snippet below with another uri of your choice. You can find more about ZOOM APIs here.

   var options = {
   uri: "https://api.zoom.us/v2/users/"+email, 
   qs: {
       status: 'active' 
   },
   auth: {
       'bearer': token
   },
   headers: {
       'User-Agent': 'Zoom-api-Jwt-Request',
       'content-type': 'application/json'
   },
   json: true //Parse the JSON string in the response
};

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published