A Telegram bot-based file sharing application with integrated video streaming, download capabilities, and ad monetization.
If you're building a mobile app that integrates with this API, start here:
-
APP_FLOW_SIMPLE.md β START HERE - EASIEST GUIDE
- Simple step-by-step flows
- No code, just clear process
- Intent flow + Network link flow
- Perfect for AI to build app
-
- Quick start guide
- Overview of features
- Getting started steps
-
- Complete API reference
- All endpoints with examples
- Authentication & security
-
- Detailed integration guide
- Process explanations
- Deep link/Intent setup
- UI/UX recommendations
-
- Visual flow diagrams
- Complete user journey
- Sequence diagrams
-
SUPPORTED_VIDEO_FORMATS.md π¬ NEW!
- All supported video formats
- Player features and capabilities
- Browser compatibility guide
- Best practices for video integration
# 1. Get your API token
Visit: https://your-domain.com/publisher
# 2. Read the documentation
Start with: API_README.md
# 3. Implement the flow
Follow: MOBILE_INTEGRATION_GUIDE.mdThis platform provides:
- File Sharing via Telegram bot
- Web Interface for uploads and playback
- Publisher System with analytics dashboard
- Ad Management with multiple networks
- API System for mobile app integration
- β Video streaming with range request support
- β Multi-format support (MP4, WebM, MOV, HLS streaming, and more)
- β Mobile-optimized player for Android apps
- β Secure download links with expiration
- β Ad monetization (Rewarded, Interstitial, Banner)
- β Publisher dashboard with analytics
- β Admin panel for configuration
- β Deep link support for Android apps
- β RESTful API for mobile integration
When integrated with a mobile app, users get:
- My Video - Play device local videos
- Network Link - Stream/download videos from URLs
- Downloaded Videos - Offline playback
Enter video URL β Extract hash ID β Show rewarded ad β
Show interstitial ads β Generate secure links β Stream/Download
- Backend: Python (Quart framework)
- Bot: Telethon (Telegram API)
- Database: PostgreSQL
- Web Server: Uvicorn (ASGI)
- Authentication: Token-based API auth
- Video Delivery: Range request streaming
/- Home page/play/{hash_id}- Video player with deep link/stream/{file_id}- Desktop video player (HTML5 formats)/stream/mobile/{file_id}- Mobile-optimized player/dl/{file_id}- Direct download/streaming endpoint (accepts all formats)/upload- File upload interface
/admin/dashboard- Admin dashboard/admin/publishers- Publisher management/admin/ad-networks- Ad network configuration/admin/settings- System settings
/publisher/dashboard- Publisher dashboard/publisher/videos- Video management/publisher/api- API key management
/api/request- Request video access/api/links- Generate stream/download links/api/rewarded_ads- Get rewarded ad config/api/interstitial_ads- Get interstitial ad config/api/banner_ads- Get banner ad config/api/tracking/postback- Track impressions
The platform tracks:
- Video upload statistics
- File access logs
- Ad impressions per publisher
- Revenue calculations
- Daily usage metrics
- Token-based API authentication
- Temporary download/stream links (1 hour expiry)
- One-time use tokens
- File access logging
- Publisher authentication
- Admin role protection
- Multiple ad network support
- Daily limit configuration
- Priority-based network selection
- Automatic fallback mechanism
- Real-time impression tracking
- Publishers earn per impression
- Configurable impression rates
- Automated earnings calculation
- Dashboard analytics
- Register as publisher at
/publisher/register - Generate API token in dashboard
- Read
API_README.md - Follow
MOBILE_INTEGRATION_GUIDE.md
- Access admin panel at
/admin - Configure ad networks
- Set impression rates
- Manage publishers
- Monitor analytics
- Register at
/publisher/register - Upload videos via web or Telegram bot
- Get API key for programmatic uploads
- Track earnings in dashboard
.
βββ bot/
β βββ plugins/ # Telegram bot commands & handlers
β βββ server/ # Web server & API endpoints
β βββ models.py # Database models
β βββ config.py # Configuration
βββ API_README.md # Mobile dev quick start
βββ API_DOCUMENTATION.md # Complete API reference
βββ MOBILE_INTEGRATION_GUIDE.md # Integration tutorial
βββ API_FLOW.md # Flow diagrams
βββ README.md # This file
- User sends file to Telegram bot
- Bot uploads to Telegram channel
- System generates hash ID
- Returns shareable play link
- User enters video URL
- App extracts hash ID
- Request video access (API)
- Show rewarded ad
- Show interstitial ads
- Get stream/download links
- Play or download video
- User clicks play link in browser
- Shows "Play in App" button
- Opens mobile app via intent
- App processes hash ID
- Follows mobile app flow
DEPLOYMENT_GUIDE.txt- Server deployment instructionsVPS_SETUP.txt- VPS configuration guidereplit.md- Development notes & architecture
# Install dependencies
pip install -r requirements.txt
# Configure environment variables
DATABASE_URL=postgresql://...
BOT_TOKEN=your_telegram_bot_token
AD_API_TOKEN=your_api_token
# Run the application
python -m botDATABASE_URL- PostgreSQL connection stringBOT_TOKEN- Telegram bot tokenAD_API_TOKEN- API authentication tokenAPI_ID- Telegram API IDAPI_HASH- Telegram API hashCHANNEL_ID- Telegram channel ID for file storage
- Mobile Developers: Start with
API_README.md - Publishers: Access
/publisher/dashboard - Administrators: Access
/admin/dashboard
See terms of service at /terms-of-service
Privacy policy at /privacy-policy
Last Updated: October 2025
Version: 1.0