【问题标题】:How to set up a webhook in Telegram bot如何在 Telegram bot 中设置 webhook
【发布时间】:2018-01-16 09:24:31
【问题描述】:

我无法连接 webhook 电报。安装了证书“让我们加密”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

所有的时间都回来了

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

我做错了什么?

【问题讨论】:

    标签: ssl nginx telegram-bot


    【解决方案1】:

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

    使用 /newbot 命令创建一个新机器人。 Bot Father 会询问您的姓名和用户名,然后为您的新机器人生成授权令牌。

    参考:Frequently Asked Questions

    【讨论】:

    • 谢谢。只换了代币就赚了
    猜你喜欢
    • 2017-07-22
    • 2017-05-31
    • 1970-01-01
    • 2017-10-02
    • 2017-10-17
    • 1970-01-01
    • 1970-01-01
    • 2016-08-11
    • 2017-08-03
    相关资源
    最近更新 更多