Help understanding how to create meeting using backend

Hi All
I am using zoom to create meetings on the backend and join meetings on the frontend.
The frontend sample worked great to join a meeting I created using the zoom dashboard, now I need to create a meeting using nodejs backend.

I am using this project on github ( https://github.com/zoom/sample-app-node ), which btw seems very outdated since it mentions v1 api, but since I could not find a sample that guides me better than that one, that’s what I choose so far, please let me know if there is a more up to date.

My problem is that I am trying to make that nodejs sample work, and when I read the docs it mentions a complete different way to make calls to the zoom api.

So finally to my first question, today, to create a meeting using the api rest calls, do I really need to either have a jwt token to be used in every request, or use oauth?
I am very new to nodejs and backend in general, so I do not understand how all this is supposed to come together so the api calls can be made.
Question 1.a, if the answer above is true, can the jwt/oauth be handled in the same nodejs server as the one that is going to make the api call to create the meeting? Since all the samples are very specific to only one task, it gives me the impression that I would need a server that only gets the JWT or makes the oauth and another one that does in fact the create meeting api call…

Second question
I there a sample somewhere that shows how a nodejs server would use either jwt or oauth and make a create meeting call using the latest API (v2) ?

Ok so I’ll keep answering my own questions, to whomever is interested in this: How to create a meeting using nodejs

Download the jwt sample from https://github.com/zoom/zoom-api-jwt and follow the steps presented there to install

Create a new request handler just before the lines:

//use userinfo from the form and make a post request to /userinfo
app.post("/userinfo", (req, res) => {

and add the follwing sample code:

app.post("/newmeeting", (req, res) => {
  email = "your maketplace developer email";
  var options = {
    method: "POST",
    uri: "https://api.zoom.us/v2/users/" + email + "/meetings",
    body: {
      topic: "test create meeting",
      type: 1,
      settings: {
        host_video: "true",
        participant_video: "true"
      }
    },
    auth: {
      bearer: token
    },
    headers: {
      "User-Agent": "Zoom-api-Jwt-Request",
      "content-type": "application/json"
    },
    json: true //Parse the JSON string in the response
  };

  rp(options)
    .then(function(response) {
      console.log("response is: ", response);
      res.send("create meeting result: " + JSON.stringify(response));
    })
    .catch(function(err) {
      // API call failed...
      console.log("API call failed, reason ", err);
    });
});

And make your postman/frontend call to that newmeeting endpoint like localhost:3000/newmeeting …

Hey @gabriel.rf0,

That is exactly how to do it! :slight_smile:

Let me know if you have additional questions!

Thanks,
Tommy