Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to delete Shopify Webhooks made thru Shopify API?

I'm having trouble deleting Webhooks that I created thru the Shopify API. To create the webhook, I used this code in RoR:

webhook = ShopifyAPI::Webhook.create(format: "json", topic: "orders/create", address: "some address")

I'm able to send a GET request and retrieve all the webhooks that were created. But when I send the DELETE request with the respective ID, the response is "404 Not Found - errors: Not found". I'm sending the DELETE request using Firefox's RESTClient, and the format is like this:

DELETE https://api_key:shared-secret@hostname/admin/webhooks/1855159.json

Maybe it's not working because the webhooks were created via the API. Is there another way to delete the webhooks? Thanks in advance!

like image 877
mr4nd Avatar asked Jun 29 '12 19:06

mr4nd


People also ask

How do I delete webhooks?

To delete a webhook You must use the deregister-webhook-with-third-party command to deregister the webhook before you delete it. This command produces no output. For more information, see Delete the webhook for your GitHub source in the AWS CodePipeline User Guide.

How do you get your webhook Subscriptions back?

Getting your webhook subscriptions back should be straightforward as your app already the code that registered them in the first place. If you know for sure that they're gone you can just re-run that and you'll be good to go.

Where are Shopify webhooks?

Create a Shopify webhook using the API Shopify's webhook API can be accessed at https://{shop}.myshopify.com/admin/{version}/webhooks.json (remember to replace the values in {} with yours). To create a webhook, you need to send a POST request to this endpoint containing data.


2 Answers

DELETE/admin/webhooks/4759306.json

Delete a webhook

Remove an existing webhook from a shop

DELETE /admin/webhooks/#{id}.json
like image 179
Rash Avatar answered Sep 21 '22 12:09

Rash


I think when you remove the app from admin panel, the webhooks created by that app are automatically removed

like image 20
Sumit Garg Avatar answered Sep 23 '22 12:09

Sumit Garg