Generating a Zoom Meeting Url Using Firebase Cloud-Functions
Tags: zoomapi, node, react, firebase
Published: 2021-05-02 03:53:14

<h2>Introduction</h2>
Hello, everyone! I hope you all are doing well. In this blog, I will share and demonstrate how to generate the Zoom meeting url using the Cloud-Functions in the fastest way. This is my very first blog writing about what I have just learned or completed in order to leave it as an example for those who might come later having same requirements or problem as me.

<h2>Let's get started</h2>
 Firstly, you should go and create the Zoom for developer account in (https://marketplace.zoom.us/).
![Screen Shot 2564-05-02 at 09.33.54](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mdt3xnm8u8dlkgrvenay.png)
 You should see this above image after you signed up successfully. Then, go create the app in the Zoom marketplace for JWT as the following image.
![Screen Shot 2564-05-02 at 09.33.30](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qd5h8sd3yue4bda2al81.png)
<b>JWT<b>
![Screen Shot 2564-05-02 at 09.45.05](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/n9depza8usj61bgag9u1.png)

After you created successfully, you will be redirected to this scene and try to fill out all the required informations. 
![Screen Shot 2564-05-02 at 09.46.57](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ctzadsdc29v2wtqhr49o.png)
 ![Screen Shot 2564-05-02 at 09.47.09](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kgu4vxngifzvgrr6s5bl.png)
 
Next, you have to set the expiration time of the JWT token and for me I set it to expire in one year for the token. It might not be a good practice but it's the fastest way to generate the Zoom meeting url.

<b>Calling to the Zoom Api endpoint<b>
 ![Screen Shot 2564-05-02 at 10.02.17](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e47n4z1t8r98x3vtz7qp.png)

Now, let's try to call to the endpoint to generate the Zoom meeting url via Postman.
<b>Zoom endpoint</b>: <a>https://api.zoom.us/v2/users/me/meetings</a>
<b>Token</b>: for the token here is the JWT token of the JWT app we just created in the Zoom developer. So, you can just copy and paste it here.
<b>Post Request Body</b>
![Screen Shot 2564-05-02 at 10.12.19](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/elcz4el47r24e0i3sohh.png)
For the settings of the body request, you can set it to control over the attendees like allowing screen sharing or not ...

<b>Response</b>
 ![Screen Shot 2564-05-02 at 10.31.38](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xoaxpayrc60buor5kvxv.png)
 You will receive this as the response if the post request is successful. And for the join_url is the url which you can spread to the attendee for attending the Zoom meeting.

<b>Making request using Axios<b>
![Screen Shot 2564-05-02 at 10.38.25](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ykgrri0dbe8px63rzs10.png)

 Everything here is pretty much the same as in the Postman. In the header of the request, you just have to pass the JWT token there and if the request is successful, the same response will be returned as in the Postman. 
You can make it as onCall, onRequest or pubsub is as your need for Firebase Cloud-functions.

![Screen Shot 2564-05-02 at 10.44.28](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vlf9hhi08s61n4ktbpni.png)
 
<h2>Conclusion</h2>
I hope it might be helpful and any constructive comments are always welcomed.
Thank you!

<b>References</b>
https://marketplace.zoom.us/docs/api-reference/zoom-api/meetings/meetingcreate
https://marketplace.zoom.us/docs/guides