Topics covering webhook creation & management, event handling, Pub/Sub, and Eventbridge, in Shopify apps.
Hi, I'm trying my hand at subscribing to the APP_UNINSTALLED webhook and I have a few questions for you Shopify experts.
Are the apps already listening to this webhook by default or did I activate it without realizing it? I was doing some webook activation tests and it did not give me any error in the response, but only null (undefined) if printed with console.log. I tried uninstalling the app, and the webhook worked fine. So was it me or do apps listen to this webhook by default?
The second question is this: If I uninstall the app and previously created a subscription to a webhook, does this subscription need to be recreated if the app is reinstalled or remains active?
Sorry if I was too long-winded, thanks in advance.
Solved! Go to the solution
This is an accepted solution.
hello
1, yes, after app/uninstalled wehook is created, any uninstalled application will be notified to the address(the interface address defined when you create the webhook).
Webhook subscriptions won't automatically canceled when the app is uninstalled, it's still there, they're already active, unless you call "Remove an existing Webhook".
The above is only for app/uninstalled Webhooks, I only used this one.
I'm using the rest api, but I think they're pretty much the same
Hi, I'm a developer
On your first question, I'm not sure what you mean, if you create an uninstall webhook, when the store uninstalls the app, the webhook will call your endpoint.
With regard to your second question, there is no need to recreate. If created repeatedly, shopify will report an error :"for this topic has already been taken". The way we handle this is to catch the exception and leave it alone
Hi @loganaa , thanks for your reply. I probably explained myself wrong, the questions are the following:
Thanks in advance
This is an accepted solution.
hello
1, yes, after app/uninstalled wehook is created, any uninstalled application will be notified to the address(the interface address defined when you create the webhook).
Webhook subscriptions won't automatically canceled when the app is uninstalled, it's still there, they're already active, unless you call "Remove an existing Webhook".
The above is only for app/uninstalled Webhooks, I only used this one.
I'm using the rest api, but I think they're pretty much the same