Topics covering webhook creation & management, event handling, Pub/Sub, and Eventbridge, in Shopify apps.
Hello There,
We do have problem with app/uninstalled webhook. We are registered to the webhook successfully. It is working in our local environment with Ngrok (paid version) But we are not receiving any webhook posts in our dev environment.
log('info', `${HOST}/webhooks/app/uninstalled`); const appUninstalledWebhookResult = await registerWebhook({ address: `${HOST}/webhooks/app/uninstalled`, topic: 'APP_UNINSTALLED', accessToken, shop, apiVersion: ApiVersion.October19 }); if (appUninstalledWebhookResult.success) { log('info', `App Uninstalled Webhook Result Successful! => ${HOST}/webhooks/app/uninstalled`); } else { log('info', `App Uninstalled Webhook Error => ${JSON.stringify(appUninstalledWebhookResult)}`); }
const appUninstalledWebhook = receiveWebhook({ secret: SHOPIFY_API_SECRET_KEY }); router.post('/webhooks/app/uninstalled', appUninstalledWebhook, (ctx) => { log('info', 'App Uninstalled Response'); });
We are receiving "App Uninstalled Webhook Result Successful" log. However we do not receive any "App Uninstalled Response" log in our dev environment. Is it related with Nginx setup?
Thanks in advance.
Hey @logiwa ,
Here is a good resource to follow that explains how to you can use NodeJS and the Express.js library to properly listen to and receive Webhook POST events from Shopify: https://medium.com/@scottdixon/verifying-shopify-webhooks-with-nodejs-express-ac7845c9e40a
You should also ensure that whenever you receive a Webhook POST event from Shopify that you are responding with a Status 200 response.
To learn more visit the Shopify Help Center or the Community Blog.