A powerful web-based Telegram video downloader that supports downloading videos from both public and private channels that you have access to.
- ๐ Download from Private Channels - Access and download videos from private Telegram channels you're a member of
- ๐บ Support for public channels and groups
- ๐ฅ High-quality video downloads with original resolution
- ๐ Progress tracking with real-time updates via WebSocket
- ๐ Web-based interface - no installation required for users
- ๐ Fast and efficient downloading with concurrent support
- ๐ฑ Responsive design for desktop and mobile
- ๐ Session persistence - stay logged in across restarts
- ๐ฝ Dual Download Options - Choose between single video download or intelligent batch download
- ๐ค Smart Batch Detection - Automatically finds and groups related videos for batch downloading
- ๐ In-Channel Search - Search for specific content within channels
- โซ Smart Navigation - Load newer or older messages with dedicated buttons
- ๐ฏ Queue Management - Configurable concurrent download limits for optimal performance
- ๐ Auto-Retry - Automatic retry mechanism for failed downloads with exponential backoff
- Frontend: React + TypeScript + Vite
- Backend: Node.js + Express + TypeScript
- Telegram API: GramJS (MTProto client)
- Database: SQLite for session management
- Real-time Updates: Socket.IO
- UI Components: Ant Design
- Node.js (v16 or higher)
- npm or yarn
- Telegram API credentials (API ID and API Hash)
git clone https://github.com/yourusername/teledown.git
cd teledownInstall backend dependencies:
cd backend
npm installInstall frontend dependencies:
cd ../frontend
npm install-
Get your Telegram API credentials:
- Visit https://my.telegram.org
- Log in with your phone number
- Go to "API Development Tools"
- Create a new application if you haven't already
- Copy your
api_idandapi_hash
-
Create environment configuration:
Backend configuration (backend/.env):
API_ID=your_api_id
API_HASH=your_api_hash
SESSION_STRING=optional_session_string
PORT=8000
DATABASE_PATH=./database.db
DOWNLOAD_PATH=./downloads
MAX_CONCURRENT_DOWNLOADS=2 # Number of simultaneous downloads (default: 2)Frontend configuration (frontend/.env):
VITE_API_URL=http://localhost:8000Build the backend:
cd backend
npm run buildBuild the frontend:
cd ../frontend
npm run buildStart the backend server:
cd backend
npm run devIn a new terminal, start the frontend development server:
cd frontend
npm run devThe application will be available at:
- Frontend: http://localhost:3000
- Backend API: http://localhost:8000
Start the backend server:
cd backend
npm startFor the frontend, serve the built files:
cd frontend
npm run preview
# Or use any static server like nginx, apache, etc.TeleDown features an intelligent dual-download system that adapts to your needs:
- Downloads only the selected video file
- Perfect for specific content you need immediately
- Faster for individual files
- No additional processing or analysis
- Smart Content Detection: Automatically analyzes message patterns to find related videos
- Text Message Association: Uses adjacent text messages to group related content
- Automatic Folder Organization: Creates folders based on the descriptive text content
- Confirmation Dialog: Shows you exactly what will be downloaded before starting
- Queue Management: Downloads are processed in controlled batches (configurable via MAX_CONCURRENT_DOWNLOADS)
- Clean File Naming: Preserves original filenames from Telegram for consistency
How Batch Download Works:
- Analyzes the selected video's context within the channel
- Searches backward and forward for related text messages
- Identifies video groups based on message timestamps and content patterns
- Presents a confirmation dialog with folder name and video list
- Downloads all related videos to an organized folder structure
This intelligent system is perfect for content series, multi-part videos, or collections that are posted together but may be separated by other messages in the channel.
- Open the application in your browser
- Enter your phone number with country code
- Enter the verification code sent to your Telegram app
- If you have 2FA enabled, enter your password
- Your session will be saved for future use
- View all channels you have access to (both public and private)
- Search channels by name
- See channel statistics (member count, post count)
- Channels are paginated for better performance
- Click on any channel to view its media content
- Preview video thumbnails and information with metadata (duration, file size)
- Two Download Options Available:
- ๐ฝ Single Download (Blue Button): Downloads only the selected video
- ๐ฆ Batch Download (Purple Button): Automatically finds and downloads all related videos in the group
- Monitor real-time download progress with WebSocket updates
- Downloads are organized into folders based on content groups
- All downloads are saved to the configured directory
- View active downloads with progress bars
- See queued downloads waiting to start
- Cancel unwanted downloads
- Access download history
- Automatic retry for failed downloads (FILE_REFERENCE_EXPIRED errors)
- Configurable concurrent download limits
- Secure Authentication: Uses official Telegram MTProto protocol
- Session Encryption: All session data is encrypted locally
- No Third Parties: Direct connection to Telegram servers
- Private Downloads: Your download activity is completely private
- Data Protection: No user data is collected or shared
teledown/
โโโ backend/
โ โโโ src/
โ โ โโโ controllers/ # Request handlers
โ โ โโโ services/ # Business logic
โ โ โโโ models/ # Data models
โ โ โโโ routes/ # API routes
โ โ โโโ utils/ # Utility functions
โ โ โโโ index.ts # Entry point
โ โโโ downloads/ # Downloaded files
โ โโโ sessions/ # User sessions
โ โโโ database.db # SQLite database
โโโ frontend/
โ โโโ src/
โ โ โโโ components/ # React components
โ โ โโโ pages/ # Page components
โ โ โโโ services/ # API services
โ โ โโโ hooks/ # Custom hooks
โ โ โโโ utils/ # Utilities
โ โ โโโ App.tsx # Main component
โ โโโ dist/ # Built files
โโโ README.md
POST /api/auth/send-code- Send verification codePOST /api/auth/verify-code- Verify code and loginPOST /api/auth/check-session- Check session statusPOST /api/auth/logout- Logout and clear session
GET /api/channels- List all accessible channelsGET /api/channels/:id- Get channel detailsGET /api/channels/:id/media- Get channel media
POST /api/download/start- Start single video downloadPOST /api/download/batch- Start batch download of related videosPOST /api/download/find-related- Find videos related to a specific videoGET /api/download/progress/:id- Get download progressPOST /api/download/cancel/:id- Cancel downloadGET /api/download/history- Get download history
-
Login Issues
- Ensure phone number includes country code
- Check if 2FA is enabled on your account
- Clear browser cache and cookies
-
Download Failures
- Check internet connection
- Verify you have access to the channel
- Ensure sufficient disk space
- FILE_REFERENCE_EXPIRED errors are automatically retried
-
Session Expired
- Re-login with your credentials
- Sessions expire after 30 days of inactivity
-
Slow Batch Downloads
- Adjust MAX_CONCURRENT_DOWNLOADS in .env file
- Default is 2 for stability, can be increased based on your connection
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- Follow TypeScript best practices
- Write unit tests for new features
- Update documentation as needed
- Ensure code passes linting
This tool is intended for personal use only. Please respect content creators' rights and Telegram's Terms of Service:
- Only download content you have permission to access
- Do not redistribute downloaded content without permission
- Respect copyright and intellectual property rights
- Use responsibly and ethically
The developers are not responsible for any misuse of this tool.
This project is licensed under the MIT License - see the LICENSE file for details.
- GramJS - Telegram MTProto client library
- Ant Design - React UI component library
- Vite - Next generation frontend tooling
- Socket.IO - Real-time bidirectional communication
If you encounter any issues or have questions:
- Check the Issues page
- Create a new issue with detailed information
- Include error messages and steps to reproduce
- Join our Telegram Support Group
- Batch download with queue management
- In-channel search functionality
- Load newer/older messages navigation
- Download scheduling
- Video quality selection
- Audio-only extraction
- Subtitle download support
- Docker support for easy deployment
- Mobile app (React Native)
- Download resume capability
- Export download history
โญ Star this repository if you find it useful!
Note: This tool requires active Telegram account authentication and only works with channels you have legitimate access to. It's designed to help you manage and backup your accessible content for personal use.