I am trying to retrieve message from a private Telegram channel. I am the member of the channel and I can see the messages both on Telegram app and Telegram Web.
I tried the following code which works as expected and prints messages for non-private channels. However, when I input the name/ID of the private channel the output is an empty string.
Is this due to the issue in the code, or it is not possible to access private messages through Telethon?
Thank you.
async with client:
async for msg in client.iter_messages(client ID integer not string, 5):
print(msg.text)