运营 ✦ 81约 30 分钟搭建中级

Telegram Webhook 桥(不轮询)

@siraustin 演示了 BotFather 令牌 → webhook(可选 Cloudflare Tunnel)的设置,让 Grok Bot 无需在轮询上消耗次数就能回复 Telegram 私信。空闲时依然便宜。与本站 YouTube 时代的 telegram-inbox-bridge 页面不同。

1

复制提示词(保留英文原文效果最好)。

2

粘贴进 Grok——打开你的 Grok Bot,把它作为第一条消息发送。

3

回答它的设置问题——大多数提示词会先采访你,然后进入固定节奏。

提示词

提示词
Adapt this outline. Do not treat it as a finished prompt. Never ask me to paste the BotFather token into a public gist or this chat.

Walk me from a Telegram BotFather token to a Grok Bot that answers Telegram DMs over a webhook bridge.
Prefer webhook over polling so idle does not consume Grok Bot turns.
Optional: Cloudflare Tunnel if I lack a public HTTPS endpoint.
Store the token in the secure field you name.
Share: https://x.ai/bot/3EyXrWLkGfi4SG-dMy427
Start: confirm whether I already have a BotFather bot.

它是怎么搭起来的

@siraustin:把 Grok Bot 接到 Telegram,无需在轮询上消耗 token 或交互轮次;可选 Cloudflare Tunnel webhook。分享链接 https://x.ai/bot/3EyXrWLkGfi4SG-dMy427(在线)。

与本站的 telegram-inbox-bridge 不同(那边是 YouTube 通用桥):本页讲的是不轮询的 webhook 路径。

  1. 创建一个 BotFather 机器人;保管好 token,不要外泄。
  2. 按分享里的 webhook 步骤操作。
  3. 在大范围分享机器人用户名之前,先用一条私信做冒烟测试。
  4. 对应的分享机器人(在线):/zh/bots/telegram-bridge-share/。

为什么它好用

轮询桥会悄悄烧掉配额。Webhook 空闲零消耗,这才是运维层面的功课。

本案例收集自公开的 Grok Bot 社区,版权归原作者所有。提示词属于参考资料:运行前请先审阅内容, 并且不要让 bot 超出你实际授予的权限行事。