telethon получить список пользователей канала

Есть код который парсить список пользователей групп, но не могу понять, что нужно добавить в коде чтобы получить список пользователей телеграмм канала (именно канала а не группы) в котором я не являюсь администратором. Просьба помочь кто знает как спарсить пользователей телеграмм канала без прав администратора.

Код парсинга пользователей телеграмм ГРУП:

import json

from telethon.sync import TelegramClient
from telethon import connection
from datetime import date, datetime
from telethon.tl.functions.channels import GetParticipantsRequest
from telethon.tl.types import ChannelParticipantsSearch
from telethon.tl.functions.messages import GetHistoryRequest

api_id = 00000
api_hash = 'xxxxxxx'
phone_number = '+xxxxxxxxxxx'

client = TelegramClient(phone_number, int(api_id), api_hash)

client.start()


async def dump_all_participants(channel):
    offset_user = 0
    limit_user = 100

    all_participants = []
    filter_user = ChannelParticipantsSearch('')

    while True:
        participants = await client(GetParticipantsRequest(channel,
            filter_user, offset_user, limit_user, hash=0))
        if not participants.users:
            break
        all_participants.extend(participants.users)
        offset_user += len(participants.users)

    all_users_details = []

    for participant in all_participants:
        all_users_details.append({"id": participant.id,
            "first_name": participant.first_name,
            "last_name": participant.last_name,
            "user": participant.username,
            "phone": participant.phone,
            "is_bot": participant.bot})

    with open('channel_users.json', 'w', encoding='utf-8') as outfile:
        json.dump(all_users_details, outfile, indent=4, ensure_ascii=False)

async def main():
    url = input("Введите ссылку на группу: ")
    channel = await client.get_entity(url)
    print('Cбор пользователей начался! Ожидайте')
    await dump_all_participants(channel)


with client:
    client.loop.run_until_complete(main())

Ответы (0 шт):