API requests for my webhooks returns empty json list

API requests for my webhooks returns empty json list

Luke_S_
Shopify Partner
3 0 0

I'm doing a simple GET API call (/admin/webhooks.json) which should return the list of webhooks (of which there are currently 2) for my shop, according to this:

https://help.shopify.cce/webhook

But the resulting list is empty.   And if I request a count,  (/admin/webhooks/count.json), the result is zero.    Example: {\"count\":0}

This is a big problem for us - the webhooks have been deleted a couple times (that's another issue in itself).  So I'd like to be able to periodically GET the list of hooks and then recreate them if necessary.

Are these API endpoints broken (they appear to be)?   This is a development store - does it not work for development stores?

 

 

Replies 4 (4)

HunkyBill
Shopify Expert
4851 60 555

When Shopify deletes a webhook (if it is broken or not responding)... they send an email to the shop administrative email account. Are you checking that account? If you used a fake one, that is your problem. They don't delete webhooks without giving you lots of notice. That means once you set them up, you do not have to POLL that endpoint with GET requests.

 

Custom Shopify Apps built just for you! hunkybill@gmail.com http://www.resistorsoftware.com

Luke_S_
Shopify Partner
3 0 0

Yes I understand that. Forget about the reference to deleted webhooks - that is another issue altogether...

 

I simply need to figure out why the API endpoint for GETing the webhook list isn't working.

 

HunkyBill
Shopify Expert
4851 60 555

maybe you did not make a webhook successfully with your API key.

 

I can confirm that the GET on webhooks works perfect at this time... just so you know. If you have created a webhook, it exists, and doing a GET for webhooks will return it. 

Custom Shopify Apps built just for you! hunkybill@gmail.com http://www.resistorsoftware.com
TanmayCreations
Tourist
5 0 4

I'm facing the same challenge. There are around 32 webhooks subscribed via notifications setting page and being listened on the external server. But when I fire a API query on count and webhook list, it returns zero. can someone help me on this?