Zoom Meetings API Integration Guide

Integrating Zoom’s API allows you to automate meeting scheduling and management. With this integration, you can schedule and manage meetings without needing a paid Zoom plan. Here’s a step-by-step guide to get you started with Zoom API integration usin…


This content originally appeared on DEV Community and was authored by Hrushi yadav

Integrating Zoom's API allows you to automate meeting scheduling and management. With this integration, you can schedule and manage meetings without needing a paid Zoom plan. Here’s a step-by-step guide to get you started with Zoom API integration using Node.js and Express.

Prerequisites

Basic knowledge of Node.js and Express.
A Zoom account.
Node.js and npm installed on your machine.

Step-by-Step Instructions

1. Create a Zoom App

  • Create a Zoom Account: If you don't have one, sign up at Zoom Marketplace.
  • Develop an App: Go to the Zoom Marketplace and click on the "Develop" icon.
    Image description

  • Build App: Click on "Build App" and select "Server to Server OAuth" app type.

  • Store Credentials: After creating the app, store the following details securely:

ZOOM_CLIENT_ID
ZOOM_CLIENT_SECRET
ZOOM_ACCOUNT_ID

2. Set Up Your Project

  • Create a Project Folder: Create a new folder for your project and initialize it with npm.

mkdir zoom-meeting-integration
cd zoom-meeting-integration
npm init -y

  • Install Dependencies: Install the required libraries using npm.

npm install axios body-parser dotenv express

  • Create Environment Variables: Create a .env file in the root directory of your project and add your Zoom credentials:
ZOOM_CLIENT_ID=YOUR_ZOOM_CLIENT_ID
ZOOM_CLIENT_SECRET=YOUR_ZOOM_CLIENT_SECRET
ZOOM_ACCOUNT_ID=YOUR_ZOOM_ACCOUNT_ID

3. Implement API Integration

  • Create an Index File: Create a file named index.js and set up your basic Express server:
const express = require('express');
const bodyParser = require('body-parser');
const axios = require('axios');
require('dotenv').config();

const app = express();
app.use(bodyParser.json());

// Your code will go here

app.listen(3000, () => {
  console.log('Server is running on port 3000');
});

  • Get an Access Token: Create a function to get an OAuth token from Zoom. Add the following code to index.js:
async function getAccessToken() {
  const response = await axios.post('https://zoom.us/oauth/token', null, {
    params: {
      grant_type: 'account_credentials',
    },
    auth: {
      username: process.env.ZOOM_CLIENT_ID,
      password: process.env.ZOOM_CLIENT_SECRET,
    },
  });
  return response.data.access_token;
}

  • API Payload
{
  "topic": "Sample Meeting",
  "type": 1,
  "duration": 30,
  "start_time": "2024-09-01T10:00:00Z",
  "agenda": "Discuss project updates"
}

  • Schedule a Meeting: Create an endpoint to schedule a meeting using the Zoom API:
app.post('/schedule-meeting', async (req, res) => {
  try {
    const token = await getAccessToken();
    const meetingData = {
      topic: 'Sample Meeting',
      type: 1,
      duration: 30,
      start_time: '2024-09-01T10:00:00Z',
      agenda: 'Discuss project updates',
    };

    const response = await axios.post('https://api.zoom.us/v2/users/me/meetings', meetingData, {
      headers: {
        Authorization: `Bearer ${token}`,
        'Content-Type': 'application/json',
      },
    });

    res.json(response.data);
  } catch (error) {
    res.status(error.response ? error.response.status : 500).send(error.message);
  }
});

  • Retrieve Meeting Link: Once you have the meeting ID, you can use it to get the meeting link:
app.get('/meeting-link/:meetingId', async (req, res) => {
  try {
    const token = await getAccessToken();
    const meetingId = req.params.meetingId;

    const response = await axios.get(`https://api.zoom.us/v2/meetings/${meetingId}`, {
      headers: {
        Authorization: `Bearer ${token}`,
      },
    });

    res.json({ join_url: response.data.join_url });
  } catch (error) {
    res.status(error.response ? error.response.status : 500).send(error.message);
  }
});

  1. Sending Meeting Links Send Emails: After retrieving the meeting link, you can use any mail service (e.g., Nodemailer) to send the meeting link to participants.
  2. Additional Information
  3. Meeting Features: Note that the API for adding participants may require a paid Zoom plan. For free plans, you can only schedule meetings and share the links manually.

By following these steps, you can successfully integrate Zoom API into your application for scheduling and managing meetings.


This content originally appeared on DEV Community and was authored by Hrushi yadav


Print Share Comment Cite Upload Translate Updates
APA

Hrushi yadav | Sciencx (2024-08-29T20:27:38+00:00) Zoom Meetings API Integration Guide. Retrieved from https://www.scien.cx/2024/08/29/zoom-meetings-api-integration-guide/

MLA
" » Zoom Meetings API Integration Guide." Hrushi yadav | Sciencx - Thursday August 29, 2024, https://www.scien.cx/2024/08/29/zoom-meetings-api-integration-guide/
HARVARD
Hrushi yadav | Sciencx Thursday August 29, 2024 » Zoom Meetings API Integration Guide., viewed ,<https://www.scien.cx/2024/08/29/zoom-meetings-api-integration-guide/>
VANCOUVER
Hrushi yadav | Sciencx - » Zoom Meetings API Integration Guide. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2024/08/29/zoom-meetings-api-integration-guide/
CHICAGO
" » Zoom Meetings API Integration Guide." Hrushi yadav | Sciencx - Accessed . https://www.scien.cx/2024/08/29/zoom-meetings-api-integration-guide/
IEEE
" » Zoom Meetings API Integration Guide." Hrushi yadav | Sciencx [Online]. Available: https://www.scien.cx/2024/08/29/zoom-meetings-api-integration-guide/. [Accessed: ]
rf:citation
» Zoom Meetings API Integration Guide | Hrushi yadav | Sciencx | https://www.scien.cx/2024/08/29/zoom-meetings-api-integration-guide/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.