webhooks - 如何在 Bigcommerce 商店中配置和上传 webhook?
问题描述
我已经按照并完成了使用 bigcommerce 文档 https://developer.bigcommerce.com/api-docs/getting-started/webhooks/setting-up-webhooks在本地系统中设置 webhook 的所有步骤
它在本地环境 ngrok 中运行良好(只能运行 8 小时)
但我需要知道如何在服务器中设置 webhook?
我需要购买单独的服务器还是可以将其设置在我的主题目录中?如果可以,如何设置?请帮忙。
解决方案
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
}
推荐阅读
- javascript - 从 html 运行时 require() 失败,但在直接运行 javascript 时有效
- java - 弹性搜索错误:自定义分析器 [custom_analyzer] 未能在名称 [my_tokenizer] 下找到标记器
- python - 如何使用 `pipenv` 访问 Django 环境变量?
- ios - 斯威夫特:我在“tableView.delegate=self”中得到“Unexpectedly found nil”
- google-apps-script - 如何在谷歌应用脚本中获取发布到网络电子表格的 ID
- google-chrome - Jupyter notebook:指向本地存储的 pdf 文档的超链接在 Chrome 中停止工作
- angular - Angular - 多个 ng 模板分组,并在条件下显示隐藏
- python - 在 python-telegram-bot 中从用户获取实时位置
- javascript - 如何从 ExecuteScript 转换 json 数组
- awk - 为什么awk在没有打印命令的情况下打印文件内容