为什么电报在设置webhook后不发送更新? [英] Why telegram does not send the updates after setting webhook?
问题描述
我可以使用Telegram getUpdates API获取更新,而在使用有效的SSL证书或自签名证书设置webhook之后,可以看到:
I can get the updates with Telegram getUpdates API, while after setting webhook with a valid SSL certificate or self-signed certificate it says:
{"ok":true,"result":true,"description":"Webhook was set"}
b $ b
但它不发送任何更新到我的webhook链接(我检查了Nginx和node.js访问日志文件),我尝试了很多curl命令setWebhook API有和没有证书,但仍没有结果:
But it does not send any updates to my webhook link (I checked the Nginx and node.js access log files), I tried a lot of curl commands for setWebhook API with and without certificate, but still no result:
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
推荐答案
在您的证书。您可以在任何SSL在线检查程序检查您的证书吗?是否正确?
Maybe problem in your certificate. Could you check your certificate in any SSL online checker? Is it ok?
例如,在这一个 https://www.sslshopper.com/ssl-checker.html
您也可以在access.log中看到请求,如果直接调用webhook url ?
Also do you see the request in access.log if call webhook url directly?
这篇关于为什么电报在设置webhook后不发送更新?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!