Welcome to Telethon’s documentation!¶
Pure Python 3 Telegram client library. Official Site here. Please follow the links on the index below to navigate from here, or use the menu on the left. Remember to read the Changelog (Version History) when you upgrade!
Important
If you’re new here, you want to read Getting Started. If you’re looking for the method reference, you should check telethon package.
What is this?¶
Telegram is a popular messaging application. This library is meant to make it easy for you to write Python programs that can interact with Telegram. Think of it as a wrapper that has already done the heavy job for you, so you can focus on developing an application.
Installation and Simple Usage¶
Advanced Usage¶
Examples¶
- Working with messages
- Working with Chats and Channels
- Joining a chat or channel
- Joining a public channel
- Joining a private chat or channel
- Adding someone else to such chat or channel
- Checking a link without joining
- Retrieving all chat members (channels too)
- Recent Actions
- Admin Permissions
- Restricting Users
- Kicking a member
- Increasing View Count in a Channel
- Bots
- Projects using Telethon
Troubleshooting¶
Developing¶
More¶
- Changelog (Version History)
- Several bug fixes (v0.18.2)
- Iterator methods (v0.18.1)
- Sessions overhaul (v0.18)
- Further easing library usage (v0.17.4)
- New small convenience functions (v0.17.3)
- New small convenience functions (v0.17.2)
- Updates as Events (v0.17.1)
- Trust the Server with Updates (v0.17)
- New
.resolve()
method (v0.16.2) - MtProto 2.0 (v0.16.1)
- Sessions as sqlite databases (v0.16)
- IPv6 support (v0.15.5)
- General enhancements (v0.15.4)
- Bug fixes with updates (v0.15.3)
- Bug fixes and new small features (v0.15.2)
- Custom Entity Database (v0.15.1)
- Updates Overhaul Update (v0.15)
- Serialization bug fixes (v0.14.2)
- Farewell, BinaryWriter (v0.14.1)
- Several requests at once and upload compression (v0.14)
- Quick fix-up (v0.13.6)
- Attempts at more stability (v0.13.5)
- More bug fixes and enhancements (v0.13.4)
- Bug fixes and enhancements (v0.13.3)
- New way to work with updates (v0.13.2)
- Invoke other requests from within update callbacks (v0.13.1)
- Connection modes (v0.13)
- Added verification for CDN file (v0.12.2)
- CDN support (v0.12.1)
- Newbie friendly update (v0.12)
- get_input_* now works with vectors (v0.11.5)
- get_input_* everywhere (v0.11.4)
- Quick .send_message() fix (v0.11.3)
- Callable TelegramClient (v0.11.2)
- Improvements to the updates (v0.11.1)
- Support for parallel connections (v0.11)
- JSON session file (v0.10.1)
- Full support for different DCs and ++stable (v0.10)
- Stability improvements (v0.9.1)
- General improvements (v0.9)
- Bot login and proxy support (v0.8)
- Long-run bug fix (v0.7.1)
- Two factor authentication (v0.7)
- Updated pip version (v0.6)
- Ready, pip, go! (v0.5)
- Made InteractiveTelegramClient cool (v0.4)
- Media revolution and improvements to update handling! (v0.3)
- Handle updates in their own thread! (v0.2)
- First working alpha version! (v0.1)
- Wall of Shame
Telethon modules
- telethon
- telethon package
- telethon.telegram_client module
- telethon.telegram_bare_client module
- telethon.utils module
- telethon.helpers module
- telethon.events package
- telethon.update_state module
- telethon.sessions module
- telethon.cryto package
- telethon.errors package
- telethon.extensions package
- telethon.network package
- telethon.tl package
- Module contents
- telethon package