telegram-download-bot

A self-hosted Telegram bot that downloads original message content through MTProto and sends it back in chat.

telegram-download-bot

telegram-download-bot

telegram-download-bot is an open-source Telegram MTProto download-and-send-back bot built on top of tdl.

Send a Telegram message link to the bot, and it uses a logged-in Telegram user account to download the original message content, then sends text, photos, videos, documents, or albums back through the bot.

Open-source repository: ConnectingEveryCorner/telegram-download-bot
Demo bot: @TGFastDownloadBot
License: AGPL-3.0


Core Features

  • Receive Telegram message links through a Telegram bot
  • Download original content with a logged-in MTProto user account
  • Send text, photos, videos, documents, and albums back to the chat
  • Login to a Telegram user account directly inside the bot flow
  • Manage access with admin-only authorization commands
  • Use a fixed bot language from config, currently English and Chinese
  • Deploy quickly with Docker Compose

How It Works

After deployment, configure the bot token, Telegram API credentials, admin chat id, and optional proxy. The admin logs in to a Telegram user account through the bot, then authorized users can send Telegram message links directly to download and receive the original content.

The bot is useful when you need a private, self-hosted Telegram download workflow that can preserve files and media from message links without building a custom MTProto client every time.

Bot Commands

  • /start and /help show help
  • /myid shows the current chat id
  • /login starts Telegram account login
  • /status checks login status
  • /logout clears the current account session
  • /grant <chat_id> authorizes a user
  • /revoke <chat_id> revokes a user
  • /users shows authorization status

Self-Hosting

The project ships with docker-compose.yml and config.example.yaml. Copy the example config, fill in the bot token, Telegram API credentials, and admin chat id, then start the service:

docker compose up -d