首页 > 解决方案 > 如何在 Bigcommerce 商店中配置和上传 webhook?

问题描述

我已经按照并完成了使用 bigcommerce 文档 https://developer.bigcommerce.com/api-docs/getting-started/webhooks/setting-up-webhooks在本地系统中设置 webhook 的所有步骤

它在本地环境 ngrok 中运行良好(只能运行 8 小时)

但我需要知道如何在服务器中设置 webhook?

我需要购买单独的服务器还是可以将其设置在我的主题目录中?如果可以,如何设置?请帮忙。

标签: webhooksbigcommercengrokcornerstone

解决方案


Yes, you'll need to set up a separate server to host the app that your webhook is registered to.

When you're ready to move your app from your local machine to a server, you'll want to register your webhook to a destination URL that's a route you've set up on your server instead of an ngrok URL.

For example, if your app was hosted on Heroku and your webhook route was /webhooks, you would send this request to create the webhook on your store:

{
 "scope": "store/product/updated",
 "destination": "https://YOURherokuURL.com/webhooks",
 "is_active": true
}

推荐阅读