How to obtain Telegram chat_id for a specific user?

前端 未结 7 1505
自闭症患者
自闭症患者 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:03

    You can just share the contact with your bot and, via /getUpdates, you get the "contact" object

提交回复
热议问题