在 Gupshup 平台上将 HTTP 端点用于 Bot 时获取 404 错误代码

Getting 404 error code while using the HTTP endpoint to the Bot on Gupshup platform

我正在使用 Gupshup 平台创建一个聊天机器人,他们有一个指向机器人的 HTTP 端点,我可以使用它配置机器人采取不同的操作,比如在不同的时间间隔发送通知。

但是当我调用下面的 HTTP 端点时

https://www.gupshup.io/developer/bot/homesbot/public?text=Hello

我收到这个错误 -

{"code":404,"message":"Kindly register listener for Http Endpoint : /public"}

您必须定义此函数来处理机器人中的端点

function HttpEndpointHandler(context, event){

 }

如果您不注册此功能,您将遇到 404 错误。 阅读 this documentation 了解更多详情。