1、申请bot,获取token,设置webhook:
https://api.telegram.org/bot<token>/setwebhook?url=https://www.youdocument.com/bot/bot.php
复制连接到浏览器中,显示以下json表示设置成功
{"ok":true,"result":true,"description":"Webhook is set"}
2、设置获取信息的监听脚本
把文件保存为bot.php服务器上
1、申请bot,获取token,设置webhook:
https://api.telegram.org/bot<token>/setwebhook?url=https://www.youdocument.com/bot/bot.php
复制连接到浏览器中,显示以下json表示设置成功
{"ok":true,"result":true,"description":"Webhook is set"}
2、设置获取信息的监听脚本
把文件保存为bot.php服务器上