如何在 Telegram 机器人中设置 webhook

How to set up a webhook in Telegram bot

我无法连接 webhook 电报。安装证书 "let's encrypt" ssl https://tele.velasoft.kz/

nginx 设置https://gist.github.com/Asetss/99575e15ffee96c53cc6d7e2cf543eb2

这样做了

curl -F "url=https://tele.velasoft.kz/botman/" -F "certificate=/var/ssl/telebot.pem" https://api.telegram.org/botTOKEN/setWebhook

https://api.telegram.org/botTOKEN/setWebhook?url=https://tele.velasoft.kz/botman

一直returns

{"ok":false,"error_code":404,"description":"Not Found"}

我做错了什么?

你需要用你自己的令牌替换botTOKEN,看起来像bot109780439:AAJqs_w-4

Use the /newbot command to create a new bot. The Bot Father will ask you for a name and username, then generate an authorization token for your new bot.

参考:Frequently Asked Questions