当我尝试为电报设置 webhook 时出现错误

i am getting an error when i tried to set webhook for telegram

我想为某些用户输入的电报设置 webhook,以便电报自动回复预定义的问题,我能够编写 运行 非常好的程序,但是当我尝试为该程序显示错误:

{
   "ok": false,"error_code": 400,"description": "Bad Request: bad webhook: Ip is reserved"
}  

我试过这样设置 webhook:

https://api.telegram.org/bot<token>/setwebhook?url=https://localhost/Manisha/bot.php  

您需要使用 Telegram 服务器可以访问的 public 盟友 URLhttp://localhost/ 不是 public。

您正在尝试向 机器人 运行 在 上的计算机发出 HTTP 请求。

这不是您的服务器,这是 Telegram 的服务器。它不起作用,因为:

  • 你的PHP没有安装
  • Telegram 不会让您的机器人访问他们的内部服务器