# How to Create a Webhook Dynamically

**URL:** <https://devforum.zoom.us/t/how-to-create-a-webhook-dynamically/100875>\
**Category:** API and Webhooks\
**Tags:** webhooks, recording\
**Created:** [December 28, 2023, 12:10pm UTC](https://devforum.zoom.us/t/how-to-create-a-webhook-dynamically/100875 "2023-12-28T12:10:56Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ramki](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ramki/32/34842_2.png) [@ramki](https://devforum.zoom.us/u/ramki)\
**Post date:** [December 28, 2023, 12:10pm UTC](https://devforum.zoom.us/t/how-to-create-a-webhook-dynamically/100875/1 "2023-12-28T12:10:57Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![gianni.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/gianni.zoom/32/32523_2.png) [@gianni.zoom](https://devforum.zoom.us/u/gianni.zoom)\
**Post date:** [December 28, 2023, 12:55pm UTC](https://devforum.zoom.us/t/how-to-create-a-webhook-dynamically/100875/2 "2023-12-28T12:55:12Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ramki](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ramki/32/34842_2.png) [@ramki](https://devforum.zoom.us/u/ramki)\
**Post date:** [December 28, 2023, 1:15pm UTC](https://devforum.zoom.us/t/how-to-create-a-webhook-dynamically/100875/4 "2023-12-28T13:15:01Z")

</div>

```auto
    // **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].

---

<div class="post-metadata">

**Author:** ![gianni.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/gianni.zoom/32/32523_2.png) [@gianni.zoom](https://devforum.zoom.us/u/gianni.zoom)\
**Post date:** [December 28, 2023, 4:22pm UTC](https://devforum.zoom.us/t/how-to-create-a-webhook-dynamically/100875/5 "2023-12-28T16:22:56Z")

</div>

> [@ramki](#):
>
> [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](https://developers.zoom.us/docs/integrations/oauth-scopes/)

---

<div class="post-metadata">

**Author:** ![ramki](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ramki/32/34842_2.png) [@ramki](https://devforum.zoom.us/u/ramki)\
**Post date:** [December 29, 2023, 11:15am UTC](https://devforum.zoom.us/t/how-to-create-a-webhook-dynamically/100875/6 "2023-12-29T11:15:44Z")

</div>

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](https://6371-115-245-208-212.ngrok-free.app/zoom_callback).

```auto
// **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');

});

```

---

<div class="post-metadata">

**Author:** ![gianni.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/gianni.zoom/32/32523_2.png) [@gianni.zoom](https://devforum.zoom.us/u/gianni.zoom)\
**Post date:** [December 29, 2023, 1:49pm UTC](https://devforum.zoom.us/t/how-to-create-a-webhook-dynamically/100875/7 "2023-12-29T13:49:31Z")

</div>

Hi @ramki ,

Check out this article and guide on downloading recordings from webhooks: [Zoom Meeting API querying tips - Download recordings using webhooks](https://developers.zoom.us/blog/meeting-api-querying-tips-part4/)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [December 30, 2023, 1:49pm UTC](https://devforum.zoom.us/t/how-to-create-a-webhook-dynamically/100875/8 "2023-12-30T13:49:37Z")

</div>

Closed on December 30, 2023, 1:49pm UTC

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