【问题标题】:Telegram webhook not found even though it exists即使存在,也找不到 Telegram webhook
【发布时间】:2018-09-25 13:20:45
【问题描述】:

我不明白为什么 Telegram API 说 webhook.php 不存在,即使我可以使用浏览器访问它。

电报 API:

{"ok":false,"error_code":404,"description":"未找到"}

链接:

https://api.telegram.org/56014xxxx:AAxxxxxxxxxxxxxxxxxxxxxxx/setWebhook?url=https://hexah.net/Telegram/webhook.php

【问题讨论】:

    标签: php telegram webhooks telegram-bot


    【解决方案1】:

    您似乎错误地授权了您的机器人/应用程序,请参阅https://core.telegram.org/bots/api#authorizing-your-bot

    【讨论】:

      【解决方案2】:

      请改用此 URL 格式:

      https://api.telegram.org/bot56014xxxx:AAxxxxxxxxxxxxxxxxxxxxxxx/setWebhook?url=https://hexah.net/Telegram/webhook.php
      

      【讨论】:

        【解决方案3】:

        最后的问题是需要对 URL 进行编码

        https://api.telegram.org/botxxxx:xxxx/setWebhook?url=https%3A%2F%2Fwww.hexah.net%2FTelegram%2Fwebhook.php

        (感谢在 Telegram Bot 频道上帮助我的人)

        但我仍然不明白为什么我的旧链接在没有编码的情况下也能正常工作...

        【讨论】:

          猜你喜欢
          • 2019-11-10
          • 2018-06-17
          • 1970-01-01
          • 2017-10-10
          • 1970-01-01
          • 1970-01-01
          • 2023-01-11
          • 2021-08-15
          • 2015-10-26
          相关资源
          最近更新 更多