How to Create a Webhook Dynamically

  1. We are building an extension in Zoom, and we are facing a challenge with creating a webhook dynamically for every user. The purpose of the webhook is that when the meeting ends, that particular meeting recorded will be uploaded into an external product (Zoho workdrive).

So, I have noticed that I can only set up a webhook manually. but I want to create a Webhook dynamically by the code.

  1. I am unable to find the scopes: [webhook:read:admin, webhook:write:admin].

These are the difficulties I’m facing. Could you kindly assist us?

Hi @ramki ,

Currently, you have to add the events you’d like to subscribe to to the application via Zoom Marketplace that you’re using to access the Zoom API.

You cannot subscribe dynamically.

    // ** Webhook ** //
    const webhookURL = 'https://0856-115-245-208-212.ngrok-free.app';
    async function createWebhook() {
      const response = await axios.post('https://api.zoom.us/v2/webhooks',
        {
          event: 'meeting.started',
          endpoint: webhookURL,
        },
        {
          headers: {
            Authorization: `Bearer ${accessToken}`,
          },
        });

      return response.data;
    }

    const createdWebhook = await createWebhook();
    console.log('Created Webhook:', createdWebhook);

This is the way I am doing POST method but 2. I am unable to find the scopes in Zoom marketplace : [webhook:read:admin, webhook:write:admin].

These scopes do not exist. You cannot create/add webhooks programmatically at this time. Here is the list of all available scopes you can manually add to your app: OAuth scopes

Hi Gianni,
I am trying to get recorded video from the webhook,but I have added scope in the webhook [Recording stated and Recording ended] but can’t get the recording, but I can get the JSON on Meeting started and Meeting ended.

This is the i have using by the URL i am getting the responce.
Event notification endpoint URL :https://6371-115-245-208-212.ngrok-free.app/zoom_callback.

// ** webbook ** //
app.use(bodyParser.json());

app.post('/zoom_callback', async (req, res) => {
  const webhookEvent = req.body;
  console.log('Received Zoom webhook:', webhookEvent);
  console.log("Webhook");

  res.status(200).send('Webhook received successfully');

});

Hi @ramki ,

Check out this article and guide on downloading recordings from webhooks: Zoom Meeting API querying tips - Download recordings using webhooks

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.