This Python script mirrors messages from one Telegram channel to another. It's designed to be simple and easy to use.
Get your api_id
and api_hash
from Telegram's Developer Page.
- Clone the Repository
git clone https://github.com/manalope/telegram-to-telegram-channel-mirror.git
cd telegram-to-telegram-channel-mirror
- Install Dependencies
pip3 install -r requirements.txt
Just run the script: Upon launch, config.json
is created or updated. Manual editing is OK. Private channels have a negative -
sign in front of them.
Example of config.json
:
{
"api_id": "your_api_id",
"api_hash": "your_api_hash",
"source_channel_id": "-123456789",
"target_channel_id": "-987654321"
}
python3 telegram_channel_mirror.py
During setup, a telegram_channel_mirror.session
file is generated allowing subsequent connection without re-authentication.
Released under MIT License.
Uses Telethon library. Thank you to that project.