Receiving webhook events on multiple endpoints

I have created multiple Server-to-Server OAuth apps on zoom marketplace, each for separate environment in my organization → pw-server, pw-dev and pw-staging.
I use pw-server app for consuming zoom apis and webhook events on production environment. I receive the webhook events on the Event notification endpoint URL that I have provided in the Event Subscriptions section inside the Feature tab. Now, on this endpoint, I receive all the events that i have subscribed for.

Similarly, I want to subscribe to events on my pw-dev app. When I add the dev-environment endpoint in pw-dev app’s Event notification endpoint URL, I start receiving all the events that I also get on endpoint of pw-server’s endpoint. My question is:

  • Will the same events still be sent to pw-server app’s endpoint? or will pw-server stop receiving the events and it will be re-routed to pw-dev app’s endpoint?
  • Is there any way to segregate the two and get selective events on each app? If not, is there a way I can customize the body of the event payload, so that I have some identifier that which event is coming for which environment?

My use-case is, that if a webinar has been created using zoom’s create webinar api, where the zoom access token sent in Authorization headers was generated using pw-server’s clientId:clientSecret, this webinar’s events should be received on my pw-server’s endpoint only. And events of webinars created using pw-dev’s oauth token, should be received on pw-dev’s endpoint only, so that I do not need to process extra requests on either of my ENVs.
Let me know if the use-case is clear. We need clarity on this ASAP as we will be starting QA on dev only after this clarification on this.

Thank you.

1 Like

Hi @gaurav.gupta1 , my suggestion is to use tracking fields when creating the Webinar. This would allow you to send separate identifiers for Webinars created from pw-server or pw-dev.

The workflow should be as follows:

  1. Setup a tracking field for your Webinars for the two environments. (example: “Environment”)
  2. When you create a Webinar using the API, send a corresponding tracking field (server/dev) in the tracking_fields array in the request body.
    Example:
// request body
{
    "tracking_fields": [
        {

            "field": "environment", // needs to match a tracking field in your account
            "value": "server" // could also be your own uuid 
        }
    ]
}
  1. Confirm the tracking field in the response of the POST request, store using the ID or UUID of the Webinar.
  2. Receive a webhook event for webinar.created on both server and dev environments. Duplicate webhook events will be sent to each environment.
  3. Lookup/match webinar’s tracking field using the ID or UUID in the get a Webinar endpoint.

This should allow you to identify the source of the Webinar’s creation. You could use your own UUIDs for the tracking field’s value if beneficial.

Answering the original questions:

  1. Events will continue to be sent to all event subscriptions. Creating new subscriptions will not affect existing subscriptions.
  2. We do not have a way to separate event delivery based on the event’s origin/creation (API/UI or client ID, for example). All events will be sent to the subscribed endpoints.

I understand and appreciate the use case to differentiate event delivery based on the client ID used to send the request that created the event. We’ve evaluated this in the past and have determined this is not something we can put on our roadmap.

I hope this helps! As you’re building out the integration, let us know if there’s anything we can help clarify or expand to support the use case. :slight_smile:

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