This bot allows users to upload Instagram Reels directly from Telegram, providing a seamless integration between the two platforms. With support for both single and multiple Reels uploads, users can effortlessly share their content on Instagram through a simple Telegram interface.
- Upload Single Reels: Send a single video and upload it to Instagram as a Reel.
- Upload Multiple Reels: Send multiple videos at once, and the bot will upload them one by one with a 30-second gap.
- Multi-Language Support: Supports both Persian and English, allowing users to interact with the bot in their preferred language.
- User Authorization: Only authorized users can interact with the bot, ensuring security.
- Custom Captions: Upload Reels with custom captions, stored in a text file.
You can watch the test video for the bot below:
- Python 3.x
- Pyrogram: A Python library for Telegram Bot API.
- instagrapi: A Python library for Instagram API.
- Asyncio: For asynchronous handling of multiple tasks, such as downloading videos and uploading them with delays.
Before running the bot, make sure you have the following installed:
- Python 3.10.x
pipfor managing Python packages
https://github.com/otterai/TGmeta.git
cd TGmetaInstall the required libraries using pip:
pip install -r requirements.txt- Go to BotFather on Telegram and create a new bot.
- Get your bot token from BotFather.
- Add the token in the
TELEGRAM_BOT_TOKENvariable inside the script.
- Log in to your Instagram account via the
instagrapilibrary using your credentials. - Store your Instagram username and password in the appropriate variables (
INSTAGRAM_USERNAMEandINSTAGRAM_PASSWORD).
- Create a text file called
authorized_users.txtand add the Telegram user IDs of users who are allowed to use the bot. - Each user ID should be on a new line.
- You can manually set the language for each user in the
languages.txtfile, where the format isuser_id:language. - Available languages:
fa(Persian),en(English).
- Create a file named
caption.txtand add a default caption that will be used when uploading Reels.
Once you’ve configured the bot with your credentials and settings, you can start the bot with the following command:
python bot.pyThe bot will start running and be ready to handle incoming messages.
- Start the Bot: Type
/startto begin the interaction. - Choose Language: Select your preferred language (Persian or English).
- Upload a Reel: Choose either the option to upload a single Reel or multiple Reels.
- Send Video(s): After selecting the upload option, send your video or videos. The bot will handle the rest, including uploading them to Instagram.
/start– Start the bot and begin interaction.- "📤 ارسال یک Reels" (in Persian) or "📤 Upload a Reels" (in English) – Upload a single Reel.
- "📤 ارسال چند Reels همزمان" (in Persian) or "📤 Upload Multiple Reels" (in English) – Upload multiple Reels.
- The bot will upload multiple Reels with a 30-second gap between uploads.
- Users who are not authorized will be blocked from using the bot.
- The captions for the Reels are customizable through the
caption.txtfile. - You can extend the bot to support additional features, such as hashtags or geotags for the uploaded Reels.
This project is licensed under the MIT License – see the LICENSE file for details.
We welcome contributions! Please feel free to open issues or submit pull requests.
For any issues or suggestions, feel free to open an issue on the GitHub repository, or reach out via Telegram at @metaui.
Happy Reels uploading! 🎥🚀