Webhook Registration via API Responds with success, but does not fire nor appear in /webhooks.json

Highlighted
New Member
3 0 0

I've been working on a development store doing some testing to get my feet wet with Shopify app development and have run into a strange issues where I have the following:

  • My app registers an "app/uninstalled" webhook during app installation, Shopify API reports a happy 201 response
  • Reviewing /admin/webhooks.json shows nothing ({"webhooks":[]})
  • Attempting to register the webhook manually using curl indicates the webhook is already registered
    • "{"errors":{"address":["for this topic has already been taken"]}}"
  • The webhook does not fire on app uninstallation
    • I have checked my nginx access and error logs and have confirmed no request corresponding to the uninstalled webhook is ever received by my app server

Does anyone have any idea what might be going on here? Thanks!

0 Likes
Highlighted
Shopify Expert
10006 116 1818
Reviewing /admin/webhooks.json shows nothing ({"webhooks":[]})

How did you review it. An app that created the webhook should be able to see it in that request. If you're asking for a list of webhooks from another app, you won't see it.

 

From the docs:

Webhook subscriptions are scoped only to the app that they're registered to. This means that when a webhook subscription is registered to an app, other apps can't view, modify, or delete it. For more information about how to authenticate webhooks, seeUsing webhooks. For general information about authentication, see theOAuth documentation.

As for the trigger url itself, you're not using a localhost url for that are you? that's a common mistake i see.

★ Winning Partner of the Build a Business competition. ★ http://freakdesign.com.au
0 Likes
Highlighted
New Member
3 0 0
I was viewing webhooks.json in my browser after logging into the store
admin, as I understand it that’s supposed to show all webhooks for the
store but that could be incorrect. I used a hosted app that is available
publicly and using HTTPS etc. Thanks!
0 Likes
Highlighted
New Member
3 0 0

For what it's worth, requesting the registered webhooks via the API using the access token associated with my test store did return the uninstall webhook, however the webhook still doesn't seem to be firing on app uninstallation (no entries whatsoever in access/error logs).

0 Likes