Relative Content

Tag Archive for pythontelegrampyrogram

Pyrogram Peer_ID invalid error of private channels even though chat_id is correct

I am encountering an issue with my Python script that uses Pyrogram to interact with a private Telegram channel of which I am a member of. I derived the peer id from the URL of the private channel from Telegram Web (e.g.: https://web.telegram.org/k/#-2200488212 ). It used to work fine with private channels that were created some while ago (I assume telegram has created an update for private channels), but Pyrogram is unable to work with private channels that were created recently, specifically it says invalid peer id. It did work with peer ids that looked something like this: -10051622484 – with a “-100” in the beginning. The recent private channels/groups do not have the “-100” before their peer id, e.g.: -2200488212 . IDK if these are somehow related. Maybe I am wrong, however the same script worked fine with other channels, but struggles with this one.

getting information about shareable folders in telegram

I need to get information about channels that are contained in a shared folder, such as their id or username. But there are difficulties with writing, telegram declares that the folder is empty, although this is not the case. I will be glad to look at your ways to get this data. Thank you.

Switching accounts in Pyrogram

I have a user bot, that may sometimes encounter pyrogram.errors.UserBannedInChannel. I need to change Client with new api_id and api_hash.