如何删除通过 Shopify API 制作的 Shopify Webhooks? [英] How to delete Shopify Webhooks made thru Shopify API?

查看:53
本文介绍了如何删除通过 Shopify API 制作的 Shopify Webhooks?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法删除通过 Shopify API 创建的 Webhooks.为了创建 webhook,我在 RoR 中使用了以下代码:

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")

我能够发送 GET 请求并检索所有创建的 webhook.但是当我发送带有相应 ID 的 DELETE 请求时,响应是404 Not Found - errors: Not found".我使用 Firefox 的 RESTClient 发送 DELETE 请求,格式如下:

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

也许它不起作用,因为网络钩子是通过 API 创建的.还有其他方法可以删除网络钩子吗?提前致谢!

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

推荐答案

DELETE/admin/webhooks/4759306.json

DELETE/admin/webhooks/4759306.json

删除网络钩子

从商店中删除现有的 webhook

Remove an existing webhook from a shop

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

这篇关于如何删除通过 Shopify API 制作的 Shopify Webhooks?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆