telegram 机器人创建

创建机器人名称

找到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 in bot. 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

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容