创建机器人名称
找到BotFather 用户
- 输入: /newbot
botFather: Alright, a new bot. How are we going to call it? Please choose a name for your bot. - 输入:vic
botFather: Good. Now let's choose a username for your bot. It must end inbot
. Like this, for example: TetrisBot or tetris_bot. - 输入:vicBot
botFather: Done! Congratulations on your new bot. You will find it at t.me/MetaDerbystatisticsBot. You can now add a description, about section and profile picture for your bot, see /help for a list of commands. By the way, when you've finished creating your cool bot, ping our Bot Support if you want a better username for it. Just make sure the bot is fully operational before you do this.
Use this token to access the HTTP API:
53333369:****************uPjP
Keep your token secure and store it safely, it can be used by anyone to control your bot.
For a description of the Bot API, see this page: https://core.telegram.org/bots/api
创建群
把bot 拉入群中
群中发送
/my_id @vicBot
https://api.telegram.org/bot123456789:jbd78sadvbdy63d37gda37bd8/getUpdates
从返回中找到:
"chat":{"id":-zzzzzzzzzz,-zzzzzzzzzz // id 即为chat_id