Have your say in Community Polls: What was/is your greatest motivation to start your own business?
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

webhooks.json returns empty list after successful creation of webhook

webhooks.json returns empty list after successful creation of webhook

Wodify_Dev
Shopify Partner
2 0 1

Greetings,

I have a development store where I registred a few webhooks, using the API.

The response from the API contained IDs for them and if I try to a new POST with the same data I get a response saying "address": ["for this topic has already been taken"], so it seems like the webhooks are there.

However, if I send a GET to webhooks.json it returns {"webhooks":[]}.

Am I wrong to expect this GET to return the webhooks I created earlier? Currently my issue is that I want to change to remove some webhooks, but I have lost their IDs.

Replies 3 (3)

Josh_Brown1
Shopify Staff (Retired)
146 0 28

Hello,

Are you reading /admin/webhooks.json using the same API key that you used to create the webhook? Webhooks are only visible to the app that created them.

To learn more visit the Shopify Help Center or the Community Blog.

Wodify_Dev
Shopify Partner
2 0 1

I'm sure I was using the same API key - I only had the one... but I was probably doing something wrong. After a night's sleep I tried it again and it worked as expected. Thanks for the reply!

Josh_Brown1
Shopify Staff (Retired)
146 0 28

No problem, glad to hear this is working for you now 

To learn more visit the Shopify Help Center or the Community Blog.