Telegram BOT - How to get chat ID of users in my group?

Viewed 320

I've been using a Telegram BOT to send notifications for a group, and for users.

I already know i can get Chat ID by receiving a message from the user on my bot, using getUpdates.

I also know i can get Group ID using the same method...

But what i really need is: There is three users in my group.

  1. My bot.
  2. Me.
  3. Another user that didn't sent any messages to my bot so it does not appear on getUpdates

Is it possible to get this third user his ID? PS: I am the group owner, and also added my bot as Admin...

The third user is a normal user. Can someone help me?

Thanks!

1 Answers

That's not possible with the offical Telegram Bot API

Possible Workarounds:

Hold a list of your own. If a user is joining (new_chat_member), lefting (left_chat_member), somebody is sending a message in the group, and so on. Check Message for more information.

Check if a user is a member of the group with getChatMember.

Also may be helpful: getChatMembersCount and getChatAdministrators

Related