# Filter Webhook calls by environment with Server to Server OAuth

**URL:** <https://devforum.zoom.us/t/filter-webhook-calls-by-environment-with-server-to-server-oauth/78118>\
**Category:** API and Webhooks\
**Created:** [October 31, 2022, 6:34pm UTC](https://devforum.zoom.us/t/filter-webhook-calls-by-environment-with-server-to-server-oauth/78118 "2022-10-31T18:34:44Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![paul.keister](https://avatars.discourse-cdn.com/v4/letter/p/3ec8ea/32.png) [@paul.keister](https://devforum.zoom.us/u/paul.keister)\
**Post date:** [October 31, 2022, 6:34pm UTC](https://devforum.zoom.us/t/filter-webhook-calls-by-environment-with-server-to-server-oauth/78118/1 "2022-10-31T18:34:44Z")

</div>

We’re using Server to Server OAuth to receive Webhook callbacks to our servers. For compliance reasons, we have Webhooks disabled in our staging environment; we can’t let our test environment come in contact with live confidential data from the Webhook. For development reasons, we need to enable and test Webhooks in staging, and it is believed that the only way we can do this without exposing production data would be to set up a completely independent Zoom account for testing. Is this our only option, or is there a way to filter data that is sent to a Webhook by environment?

---

<div class="post-metadata">

**Author:** ![ojus.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ojus.zoom/32/734_2.png) [@ojus.zoom](https://devforum.zoom.us/u/ojus.zoom)\
**Post date:** [December 17, 2022, 3:22am UTC](https://devforum.zoom.us/t/filter-webhook-calls-by-environment-with-server-to-server-oauth/78118/2 "2022-12-17T03:22:16Z")

</div>

Hi @paul.keister ,

For your case would websockets be more suitable? With websockets you do not provide zoom with an endpoint, instead zoom provides you with an endpoint that you need to open a websocket connection with. Once the connection is open, zoom will continue to send you all these events in real time. The events received in websockets contain similar payload as webhooks (including qss). Let me know if you need any additional clarification.

You can sign up for the beta here: WebSockets are in a public beta. Fill out this [Google Form](https://forms.gle/qvFZen5DiyUa4Us17) to sign up. See the **WebSockets Beta FAQ** below for details.

Find more information here: [https://marketplace.zoom.us/docs/api-reference/websockets/](https://marketplace.zoom.us/docs/api-reference/websockets/)

---

<div class="post-metadata">

**Author:** ![paul.keister](https://avatars.discourse-cdn.com/v4/letter/p/3ec8ea/32.png) [@paul.keister](https://devforum.zoom.us/u/paul.keister)\
**Post date:** [December 19, 2022, 5:52pm UTC](https://devforum.zoom.us/t/filter-webhook-calls-by-environment-with-server-to-server-oauth/78118/3 "2022-12-19T17:52:40Z")

</div>

Hi @ojus.zoom , thank you for your response. I don’t think websockets would address our situation, because we need content to be filtered from the event stream before we receive it. It sounds like moving to websockets would just give us the same event stream over a different transport.

We’ve been experimenting with sub-accounts, which do exactly what we want, but also have some unexpected behavior that we’re struggling with (specifically the `RegistrantID` property seems to be missing with sub-account events.) We’re probably going to have to move to a multi-account configuration.

---

<div class="post-metadata">

**Author:** ![ojus.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ojus.zoom/32/734_2.png) [@ojus.zoom](https://devforum.zoom.us/u/ojus.zoom)\
**Post date:** [December 19, 2022, 6:09pm UTC](https://devforum.zoom.us/t/filter-webhook-calls-by-environment-with-server-to-server-oauth/78118/4 "2022-12-19T18:09:38Z")

</div>

Hi @paul.keister ,

I want to understand your use case better. Can you DM me your email with your availability this and next week?

---

<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 23, 2023, 9:45am UTC](https://devforum.zoom.us/t/filter-webhook-calls-by-environment-with-server-to-server-oauth/78118/5 "2023-12-23T09:45:43Z")

</div>

Closed on December 23, 2023, 9:45am UTC

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