Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I check whether a user is a member of a Telegram group?

I'd like to use the Telegram API to confirm that a given user is a member of a named group. I can successfully authenticate as the user given their phone number and the code that they get sent, but beyond that I'm pretty lost. I thought I could start with client.contactsSearch with @groupname, but that returns me an empty vector.

I'm using the Kotlogram library from Scala, but it's just a thin wrapper around the MT protocol.

like image 758
Isvara Avatar asked Nov 03 '25 04:11

Isvara


1 Answers

For Bot API, you can use getChatMember method.

The result will contain status for member, left, etc.

like image 97
Sean Avatar answered Nov 06 '25 03:11

Sean



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!