Re-registering webhooks

Solved
diegoalves
Excursionist
21 1 0

Hey,

I have a custom app deployed at Heroku and already installed in my store.

I registered a webhook in the authentication process and it worked for sometime. And then after awhile I started receiving e-mails from Shopify saying that my webhook was failing, until it was removed.

How can I re-register my webhook without reinstalling my app?

Since the registration of the webhook was in the authentication, I assume now I have to create a route to POST a webhook, is that correct?

Also, if I already have a webhook for orders/create for example. Can I make a POST creating another webhook for the same orders/create without removing the one that already exists?

0 Likes
mikedasilva
Shopify Staff
Shopify Staff
26 2 2

This is an accepted solution.

Hi @diegoalves ,

 

If we weren't able to get a successful response from the destination of the webhook after multiple retries then we remove the failing webhook subscription. You can use the API to look at what subscriptions are active. 

How can I re-register my webhook without reinstalling my app?

You can also use the API to re-register the subscription that was removed. Both of these will require using the token from the installation of your app on a specific shop.

Since the registration of the webhook was in the authentication, I assume now I have to create a route to POST a webhook, is that correct?

Depending on how you have your app architected, you might be able to do this without reinstalling.

If you contact support with some details around the subscription that was removed, we can try to provide more assistance.

 

Also, if I already have a webhook for orders/create for example. Can I make a POST creating another webhook for the same orders/create without removing the one that already exists?

You can subscribe to the same topic by specifying a different address from the one that exists. However, you can also just update the existing one with the new address.

 

Cheers

mikedasilva | Developer @ 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

0 Likes
diegoalves
Excursionist
21 1 0

Thanks @mikedasilva 

0 Likes