New Shopify Certification now available: Liquid Storefronts for Theme Developers

Webhook registering

marcreese
Shopify Partner
9 0 1

Hey there,


I use the last Shopify API and the function shopify.webhooks.register to register the webhooks of my user for my app.

Most of the time it works fine and webhooks are registered correctly. But for some user, the ORDERS_CREATE webhook is not registered for some reasons.


The function return me the following object: (I dont have any errors)


{
APP_UNINSTALLED: [],
APP_SUBSCRIPTIONS_UPDATE: [],
SHOP_UPDATE: [],
ORDERS_CREATE: [],
PRODUCTS_UPDATE: [],
PRODUCTS_DELETE: []

}

 

Can you help me with that ? 

 

Thanks a lot

 

Capture d’écran 2023-04-21 à 13.19.18.png

Capture d’écran 2023-04-21 à 13.19.35.png

 

Replies 6 (6)
garyrgilbert
Shopify Partner
378 38 151

need to see the results of the request not just if you think its false in order to make heads or tails of this.

- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
marcreese
Shopify Partner
9 0 1

Hello Garyrg,

 

The object you can see in my first message is the result of the shopify.webhooks.register request.

 

Thank you a lot

garyrgilbert
Shopify Partner
378 38 151

thats a formatted response from your code. I want to see the raw response from shopify

- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
marcreese
Shopify Partner
9 0 1

Hello Garyrg,

 

I am really sorry but how I am supposed to get it?

 

I displayed directly the response of the query shopify.webhooks.register.

Capture d’écran 2023-04-27 à 14.27.59.png

And i got:

Capture d’écran 2023-04-21 à 13.19.18.png

Please tell me how I can get you the "raw" response so I can make it for you 🙏

 

Thanks a lot

garyrgilbert
Shopify Partner
378 38 151

well the issue is that you are using a library to perform the operation for you. I do all my work directly with the apis, without any middleware that parses the responses, so I see the http headers, and filecontent that is returned in the httprequest.  Shopify would not return an empty array like that without any other information.

 

Something else is going on. Unfortunately I cant see what.. you should be getting some kind of response.

- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
ShopifyDevSup
Shopify Staff
Shopify Staff
1202 190 420

Hi @marcreese,

 

Thanks for your post. For assistance registering webhooks with a library like the one in the screenshots you would need to reach out to the support team for the library.

 

To register webhooks directly without a library the REST and GraphQL API documentation is below:

 

- [REST Admin API webhook docs]

- [GraphQL Admin API webhookSubscriptionCreate mutation]

- [In Depth Developer Docs about Shopify Webhooks]

 

Hope you have a great day

Developer Support @ Shopify
- Was this reply helpful? Click Like to let us 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