A Telegram bot that downloads and forwards TikTok and Instagram Reels videos.
- Downloads and forwards TikTok videos
- Downloads and forwards Instagram Reels
- Supports user authentication for private Instagram content
- Handles rate limiting and retries
- Clean error handling and user feedback
- Docker and Docker Compose installed on your system
- Telegram Bot Token (get it from @BotFather)
- (Optional) Instagram credentials for private content access
- Clone the repository:
git clone <repository-url>
cd TeleTok- Create your environment file:
cp stack.dev.env.example stack.dev.env- Edit
stack.dev.envwith your configuration:
# Bot Configuration
API_TOKEN=your_telegram_bot_token
ALLOWED_IDS= # Optional: Comma-separated list of allowed user IDs
REPLY_TO_MESSAGE=true # Whether to reply to the original message
WITH_CAPTIONS=true # Whether to include captions when forwarding
# Instagram Configuration (Optional)
INSTAGRAM_USERNAME=your_instagram_username
INSTAGRAM_PASSWORD=your_instagram_password- Run the bot using Docker Compose:
# Build and start the bot in development mode
docker compose -f compose.dev.yaml up --build
# Run in detached mode (background)
docker compose -f compose.dev.yaml up --build -d
# View logs when running in detached mode
docker compose -f compose.dev.yaml logs -f
# Stop the bot
docker compose -f compose.dev.yaml down- Start a chat with your bot on Telegram
- Send a TikTok or Instagram Reel link to the bot
- The bot will download and forward the video to you
- If you see 401 errors for Instagram, check your credentials in
stack.dev.env - If you see 403 errors, Instagram might be rate limiting the requests. Wait a few minutes and try again
- For other issues, check the Docker logs using
docker compose -f compose.dev.yaml logs -f
Contributions are welcome! Please feel free to submit a Pull Request.