Best practice for handling subscription events required to go to different urls for different users

Description

Hi, I am currently building an app that requires a certain user’s webhook events to hit a certain endpoint, provisioned for the user. I am wondering how best to approach this requirement.

Error
The full error message or issue you are running into.

From playing around with the Zoom app, it seems like it is not possible to target a certain user’s webhook events to a certain endpoint, all event data is muxed and sent to one endpoint.

The current solution we have is to create a separate app per webhook endpoint and then have users sign up to their designated app. The downside of this is that it is cumbersome to have each app published and maintained thereafter.

Thanks in advance

Hey @bo.zhang,

Correct, you will have to add logic on your end to determine how to handle the respective user.

What is your use case of needing a seperate webhook url for each user?

Thanks,
Tommy

Hi Tommy,

Thanks for replying.

Our use case for requiring a separate webhook url is the following; we allow our users to sign up to a region. In each region, we have an environment and a corresponding url.
Therefore we would like to have particular users who have signed up to a certain region, to receive their webhook events via a certain url.

I guess our biggest headache now is the fact that we have to maintain an app per url, where the apps are pretty much identical in terms of permissions required… etc.

Thanks again for your assistance,
Bo

1 Like

Hey @bo.zhang,

Correct, you would need to create multiple apps, or handle the logic on your end once you receive the webhook.

We recommend one app to connect your site to our API functionality and then having you build out your site to route users appropriately.

Thanks,
Tommy

Hey Tommy,

Thanks for the advice. We have started developing the solution discussed, and we have reached an issue with our redirect url. It is in the following format “https://webhook-region.ourDomain.com/zoom/permissions”. We are constantly getting 403, redirect url mismatch error when requesting for the access token, however when I change this to an ngrok url, the same issue doesn’t arise.

I am wondering if it is possible for there to be url blacklisting on your end?

Thank,
Bo

Hey @bo.zhang,

Are you providing the correct redirect url when getting an access token?

Also make sure your redirect url is in your whitelist app settings.

Thanks,
Tommy