W
W
WasTabon2021-10-04 01:23:00
C++ / C#
WasTabon, 2021-10-04 01:23:00

How to see if a certain person is in a telegram channel?

Tipo you need a bot that will check if a given person is in a certain tg channel, what is this method called? I can't find what

Answer the question

In order to leave comments, you need to log in

2 answer(s)
W
WasTabon, 2021-10-06
@WasTabon

This is implemented by the getChatMember(chat_id, user_id) method, where:
chat_id - id of the channel (or group, supergroup);
user_id - user id.
If the user is subscribed to the channel, the method returns a ChatMember object containing all user data. Accordingly, check the user with this method, and if the method does not return a successful response, then the user is not subscribed to the channel.

V
Vasily Bannikov, 2021-10-04
@vabka

By-design cannot get a list of users who are subscribed to a channel.
If you need to check if the user is in the channel, you will have to do it somehow indirectly.
At the level of "click on such and such a button on such and such a post"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question