【问题标题】:Why doesn't telegram send the updates after setting the webhook?为什么设置 webhook 后电报不发送更新?
【发布时间】:2016-08-02 08:32:42
【问题描述】:

我可以使用 Telegram getUpdates API 获取更新,而在使用有效的 SSL 证书或自签名证书设置 webhook 后,它会显示:

{"ok":true,"result":true,"description":"Webhook was set"}

但它没有向我的 webhook 链接发送任何更新(我检查了 Nginx 和 node.js 访问日志文件),我尝试了很多带有和不带证书的 setWebhook API 的 curl 命令,但仍然没有结果:

curl -s -X POST https://api.telegram.org/bot<TOKEN>/setWebhook -d url='https://www.example.tech/<TOKEN>/webhook' jq .

curl -F "url=https://www.example.tech/<TOKEN>/webhook" -F "certificate=@./www_example_tech.crt" https://api.telegram.org/bot<TOKEN>/setWebhook

【问题讨论】:

    标签: node.js curl webhooks telegram-bot


    【解决方案1】:

    您的证书可能有问题。您可以在任何 SSL 在线检查器中检查您的证书吗?还好吗?

    例如在这个https://www.sslshopper.com/ssl-checker.html

    如果直接调用 webhook url,你是否在 access.log 中看到请求?

    【讨论】:

    猜你喜欢
    • 2017-09-16
    • 1970-01-01
    • 1970-01-01
    • 2019-01-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-02-16
    • 1970-01-01
    相关资源
    最近更新 更多