How to obtain Telegram chat_id for a specific user?

前端 未结 7 1517
自闭症患者
自闭症患者 2020-12-01 02:36

How to obtain user chat_id in Telegram bot API? The documentation says:

Integer | Unique identifier for the message recipient — User or G

7条回答
  •  情话喂你
    2020-12-01 03:13

    I created a bot to get User or GroupChat id, just send the /my_id to telegram bot @get_id_bot.

    It does not only work for user chat ID, but also for group chat ID.

    To get group chat ID, first you have to add the bot to the group, then send /my_id in the group.

    Here's the link to the bot.

提交回复
热议问题