APP UNINSTALLED Webhook Problem

Highlighted
Shopify Partner
1 0 1

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.

1 Like
Highlighted
Shopify Staff (Retired)
Shopify Staff (Retired)
624 103 124

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.

 

Hassain | Developer Support Specialist @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution 

0 Likes