How to differentiate webhook calls from private and public apps?

Hi,

I have a legacy private app that I still need to maintain for some time and I’m also replacing it currently with a new public app.

When I implement all the necessary changes so that my public app can work, I’ll have some shops switching to the new public app, but I’ll also have some shops who will continue using the private app for some time.

The problem that I have now is that I want to somehow differentiate which webhook call is coming from a private and which one is coming from a public app. Currently, I’m querying my database where I’m mapping shops with the type of app they installed, but I’m wondering if there is a way to know this info from webhook request headers.

Does anyone know this?

How about in the case of the public apps instead of using webhook you can use event bridge. So there would be a direct difference between the two events. It’s easy to add the Shopify event bridge since it’s an authorized event provider in both AWS and Google Cloud.

Have a look at event-bridge documentation;

https://shopify.dev/apps/webhooks/configuration/eventbridge

Mritunjay
Return Prime

1 Like

Thanks a lot for the suggestion. I’ll definitely try this out!

Yes, there is “X-Shopify-Hmac-Sha256” through which you can verify through which app webhook is triggered.