How to delete Shopify Webhooks made thru Shopify API?

烂漫一生 提交于 2019-12-13 13:28:24

问题


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!


回答1:


That is how you delete a webhook created by your application. Webhook 1855159 was created by the shop and not created by an application and can only be deleted by the shop's admin.




回答2:


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




回答3:


DELETE/admin/webhooks/4759306.json

Delete a webhook

Remove an existing webhook from a shop

DELETE /admin/webhooks/#{id}.json


来源:https://stackoverflow.com/questions/11267547/how-to-delete-shopify-webhooks-made-thru-shopify-api

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!