Answer the question
In order to leave comments, you need to log in
How to get a list of users in an open group by id?
How to get a list of users in an open group (not a channel, just a group) by group id using telethon?
Answer the question
In order to leave comments, you need to log in
client.get_participants(target_group, aggressive=True)
https://telethonn.readthedocs.io/en/latest/teletho...
from telethon.sync import TelegramClient
api_id = "your api id"
api_hash = "your api hash"
phone = "your phone"
client = TelegramClient(phone, api_id, api_hash)
client.connect()
if not client.is_user_authorized():
client.send_code_request(phone)
client.sign_in(phone, input('Enter the code: '))
print('Fetching Members...')
all_participants = []
all_participants = client.get_participants(my_chat_id, aggressive=True)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question