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

sjb9774
Visitor
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!

Replies 3 (3)

Jason
Shopify Expert
11190 225 2282
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.

★ I jump on these forums in my free time to help and share some insights. Not looking to be hired, and not looking for work. http://freakdesign.com.au ★
sjb9774
Visitor
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!
sjb9774
Visitor
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).