Create Meeting Error

Hi All

Can any one help me out
Description/Error
Failed to load resource. The server responded with a status of 403

Web JS SDK
Rest API call from Local web project for create meeting generates error " Failed to load resource 403 "

Steps to reproduce the behavior:

https://api.zoom.us/v2/users/{userId}/meetings

I used the same code that generated in postman

var data = JSON.stringify({
  "host_id": "my email id",
  "topic": "my first zoom meeting",
  "type": "2"
});

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.zoom.us/v2/users/{email id}/meetings");
xhr.setRequestHeader("content-type", "application/json");
xhr.setRequestHeader("authorization", "Bearer JWT Token");

xhr.send(data);

Hey @palanirajan70, thanks for posting and using Zoom!

I believe this is a Cors issue. Zoom does not allow the frontend to make requests to our API.

I suggest using a backend Node.js Server to make requests to the Zoom API. For example:

Your Frontend and Web SDK makes http request to your backed server > your backend server makes request to Zoom API > Zoom API responds back to your backend server > your backend server responds back to your Frontend and Web SDK.

Let me know if this helps!

Thanks,
Tommy

Thanks @tommy.

Hi Tommy.It Works.Thank you for your timely suggestion.

1 Like

Awesome, happy to help! :slight_smile:

Thanks,
Tommy