Webhooks GET endpoint is not return webhooks information, it is displaying empty array

Solved

Webhooks GET endpoint is not return webhooks information, it is displaying empty array

DeepikaBimmini
Tourist
4 0 2

Hi All,

 

Earlier we use to access mystore/admin/api/{version}/webhooks.json GET endpoint to get the web hooks information from shopify, but after shopify upgrade we are not getting the web hooks information.

 

Please let us know what can we do to access this endpoint.

 

Please find the response (which we got from Shopify) screenshot attached below for reference.

 

DeepikaBimmini_0-1686223750480.png

 

Thanks & Regards,

Deepika

Accepted Solution (1)

Shayne
Shopify Staff (Retired)
254 20 48

This is an accepted solution.

Hey Deepika,

There are a couple of reasons your webhooks might be missing:

1) They failed too many times, and have been removed. We try to send a webhook 19 times, but if we're unsuccessful, we delete the webhook. Here's a link to the docs.
2) If you created the webhook through the Admin interface, it won't show up to API clients, because it's not scoped to the client.
3) Lastly, at the beginning of 2022 we deprecated private apps in favour of custom apps. Here, you're using the apikey:password pattern — I highly recommend you transition to using custom apps and manage auth using access tokens instead! It's pretty simple, it's a big upgrade from using private credentials.

If you're not sure why your subscriptions are missing, you can always try resubscribing to the topic. Regardless of why the subscriptions aren't there, checking to see if the hooks still exist (and resubscribing if they don't) is good practice.

Hope this helps!

Shayne | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

View solution in original post

Reply 1 (1)

Shayne
Shopify Staff (Retired)
254 20 48

This is an accepted solution.

Hey Deepika,

There are a couple of reasons your webhooks might be missing:

1) They failed too many times, and have been removed. We try to send a webhook 19 times, but if we're unsuccessful, we delete the webhook. Here's a link to the docs.
2) If you created the webhook through the Admin interface, it won't show up to API clients, because it's not scoped to the client.
3) Lastly, at the beginning of 2022 we deprecated private apps in favour of custom apps. Here, you're using the apikey:password pattern — I highly recommend you transition to using custom apps and manage auth using access tokens instead! It's pretty simple, it's a big upgrade from using private credentials.

If you're not sure why your subscriptions are missing, you can always try resubscribing to the topic. Regardless of why the subscriptions aren't there, checking to see if the hooks still exist (and resubscribing if they don't) is good practice.

Hope this helps!

Shayne | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog