我从管理控制台创建了webhook并在每次调用webhook时获取输出。但是无法从API创建或获取Webhook。
在GET中:正在获取此消息,但是我通过控制台创建了Webhook。
{
"webhooks": []
}
在POST中-正在发送此邮件
{
"webhook": {
"topic": "customers/create",
"address": "https://testdomain.com/",
"format": "json"
}
}
输出-得到200 OK
<html>
<body>
<noscript>
<a href="https://app.shopify.com/services/login/identity?destination_uuid=4396f4b2-b554-45ab-88a9-bf7da732f505&return_to=https%3A%2F%2Fapp.shopify.com%2Fservices%2Flogin%2Fidentity_callback%3Fshop_name%3Ddevelopoment%26state%3DqX6mDDWTqxz7Bw20FWgPNT1HtHtVHdMIOFyKmQGFYCrX9l2_xsr150XwMUbY0z0TRaPiT65TSupUoIJSz1HCmHqH-_KxZPuR8nkCsBg23mKAYTUdIkBfjFtHtuLtPy3WBh7gDr8m-nrMsmdw_afBt31It902ABnK6pZAj9abkzjlZIm4sxkl5xUroPVHk3Y5Zv7-EvOdOT7Lko0gVWzKY05vxevb5TxZp0BNfeI1qts%253D&ui_locales=en&upgradeable=false&ux=shop">Continue</a>
</noscript>
<script type="text/javascript">
window.location = "https:\/\/app.shopify.com\/services\/login\/identity?destination_uuid=4396f4b2-b554-45ab-88a9-bf7da732f505\u0026return_to=https%3A%2F%2Fapp.shopify.com%2Fservices%2Flogin%2Fidentity_callback%3Fshop_name%3Ddevelopoment%26state%3DqX6mDDWTqxz7Bw20FWgPNT1HtHtVHdMIOFyKmQGFYCrX9l2_xsr150XwMUbY0z0TRaPiT65TSupUoIJSz1HCmHqH-_KxZPuR8nkCsBg23mKAYTUdIkBfjFtHtuLtPy3WBh7gDr8m-nrMsmdw_afBt31It902ABnK6pZAj9abkzjlZIm4sxkl5xUroPVHk3Y5Zv7-EvOdOT7Lko0gVWzKY05vxevb5TxZp0BNfeI1qts%253D\u0026ui_locales=en\u0026upgradeable=false\u0026ux=shop";
</script>
</body>
</html>
并且webhook没有创建。
答案 0 :(得分:0)
我正在通过POST请求发送cookie,清除后,它可以正常工作。