在没有 public 可访问服务器的情况下与 slack bot 交互

Interact with slack bot without a public accessible server

出于某些安全原因,我无法使用 public 可访问的服务器来接收来自 slack 的数据。

所以,这就是我打算做的事情:

问题:

  1. 有更好的选择吗?
  2. 有什么限制吗? (据我所知,按钮和下拉菜单不起作用)
  3. 如果 Web API 达到速率限制,我可以使用传入的 webhook 作为备份计划吗?

仅 RTM 方法

是的,那行得通。只有 RTM API 你被限制为:

您不能使用任何互动功能,例如:

消息发布速率限制

使用 webhook 作为 "backup" 来规避速率限制不是一种选择,因为每秒发布最多 1 条消息的速率限制适用于所有形式的消息发布。

来自documentation

In general, apps may post no more than one message per second per channel, whether a message is posted via chat.postMessage, an incoming webhook, or one of the many other ways to send messages in to Slack.

备选方案

您没有详细说明您的应用无法向 public Internet 公开端点的原因。但您可能需要考虑使用像 ngrok.

这样的 VPN 隧道