Manage Zoom Meeting Rooms through Zoom API with Laravel

This tutorial is for who want to build an app that provides server_to_server interaction with Zoom APIs to manage your account.

Build an Zoom Application

  1. Access Zoom marketplace
  2. Sign in
  3. Click Develop button on header and select Build App menu.
  4. Choose the JWT and create application with the app name what you want.
  5. Input required information and click Continue until your app will be activated. Don't forget to remember your credentials. It's used for API calling.

Create Project

Test API Endpoint

Now, we should modify api routes file to check our setting was correct.

Access http://localhost:8000/api and check our setting was set correctly. If your source code work correctly, let’s start to configure some setting to use Zoom APIs.

Add libraries and settings

To use server_to_server Zoom API, we need to generate JWT. And to authenticate, we need to communicate with Zoom.

So I add firebase/php-jwt and guzzlehttp/guzzle libraries to my project.

Additionally we need to modify .env files to set the api url & key & secret of the zoom.

Before make some endpoints, think about what we want to do.

We want to GET list of meetings, GET information of the meeting, UPDATE meeting information, DELETE meeting. The 4 types of requests are required, right?

So, I’ll make traits that include some common methods.

Make traits to use easily common methods

The first method of ZoomJWT trait is generateZoomToken. To use Zoom API, we have to include JWT token on the request.

Using firebase/php-jwt library, it's very simple to generate JWT. It returns string type's encoded JWT token.

Second, we will make method for get ZOOM_API_URL environment variable.

Third method returns Request. We'll use this Request instance to send request to Zoom API end point.

These methods return Response that is used to execute GET/POST/PATCH/DELETE request.

The last methods are used for generate new format of datetime string.

I’ll use <input type="datetime-local"> format to set start time of meeting, but that form just get yyyy-MM-dd\THH:mm format of data.

To use Zoom API, we should change time format to yyyy-MM-dd\THH:mm:ss. That's why I'm creating these 2 methods.

Make API Endpoints

I’ll create 5 end point.

Meeting rooms of the Zoom have ID that is composed of integer type of data.

Make a controller

In this time, I’ll controll meeting rooms simply because it’s just test application.

This is a declaration section.

  • use: to use traits
  • const xxx = <numeric>: Zoom supports 4 types of Meeting. In this time, we'll manage MEETING_TYPE_SCHEDULE type of Meeting because it's the default type.

This section gets list of meeting rooms and their information.

To handle start_time with timezone easily, I add start_at property in the information.

To create the meeting room, actually we need various properties, but in this time, we just use topic, agenda and start_time.

If you want to set more various options to create meeting, please read Zoom API Reference.

Next is get a meeting information section. Using meeting room id, we can get meeting room information easily.

The update section is almost same as create section.

The last section is delete section. It uses when user want to delete a specific meeting.

API Document

You can check my API Document made by Postman.

Write Medium in Markdown? Try Markdium!



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store