Initial commit: Xtream Codes API Documentation
Comprehensive API documentation for Xtream Codes IPTV Panel v2.9.2 Includes: - Complete endpoint reference for all 8 APIs - Request/response examples with curl commands - Authentication methods documentation - IPTV-specific patterns and integrations - Data models and error codes 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,118 @@
|
||||
# Xtream Codes IPTV Panel - API Documentation
|
||||
|
||||
This documentation package provides comprehensive analysis of all API endpoints in the Xtream Codes v2.9.2 IPTV panel.
|
||||
|
||||
## Documentation Files
|
||||
|
||||
| File | Description |
|
||||
|------|-------------|
|
||||
| [XTREAM_CODES_API_DOCUMENTATION.md](XTREAM_CODES_API_DOCUMENTATION.md) | **Main Documentation** - Complete API reference with all endpoints, parameters, responses, and examples |
|
||||
| [ENDPOINT_REFERENCE.md](ENDPOINT_REFERENCE.md) | Quick reference table of all endpoints and their parameters |
|
||||
| [IPTV_PATTERNS_AND_INTEGRATIONS.md](IPTV_PATTERNS_AND_INTEGRATIONS.md) | IPTV-specific patterns, integrations, and technical details |
|
||||
|
||||
## API Summary
|
||||
|
||||
### Discovered APIs
|
||||
|
||||
| API | Endpoint | Auth Method | Purpose |
|
||||
|-----|----------|-------------|---------|
|
||||
| Player API | `/player_api.php` | Username/Password | Client applications |
|
||||
| Panel API | `/panel_api.php` | Username/Password | Panel applications |
|
||||
| Admin API | `/api.php` | IP-Based | Server management |
|
||||
| System API | `/system_api.php` | IP-Based | Inter-server communication |
|
||||
| MAG Portal | `/portal.php` | MAC/Token | MAG STB devices |
|
||||
| Enigma2 | `/enigma2.php` | Username/Password | Enigma2 receivers |
|
||||
| EPG/XMLTV | `/xmltv.php` | Username/Password | Program guide |
|
||||
| Playlist | `/get.php` | Username/Password | M3U generation |
|
||||
|
||||
### Streaming Endpoints
|
||||
|
||||
| Type | URL Pattern |
|
||||
|------|-------------|
|
||||
| Live TV | `/live/{user}/{pass}/{stream_id}.{ts\|m3u8}` |
|
||||
| VOD/Movies | `/movie/{user}/{pass}/{stream_id}.{ext}` |
|
||||
| TV Series | `/series/{user}/{pass}/{stream_id}.{ext}` |
|
||||
| Timeshift | `/timeshift/{user}/{pass}/{duration}/{start}/{stream_id}` |
|
||||
| HLS Segments | `/hls/{user}/{pass}/{stream_id}/{segment}.ts` |
|
||||
|
||||
## Quick Start
|
||||
|
||||
### 1. Authenticate
|
||||
```bash
|
||||
curl "http://SERVER:25461/player_api.php?username=USER&password=PASS"
|
||||
```
|
||||
|
||||
### 2. Get Live Channels
|
||||
```bash
|
||||
curl "http://SERVER:25461/player_api.php?username=USER&password=PASS&action=get_live_streams"
|
||||
```
|
||||
|
||||
### 3. Play Stream
|
||||
```bash
|
||||
ffplay "http://SERVER:25461/live/USER/PASS/STREAM_ID.ts"
|
||||
```
|
||||
|
||||
## Key Findings
|
||||
|
||||
### Total API Endpoints Documented
|
||||
- **Player API**: 10 actions
|
||||
- **Panel API**: 2 actions
|
||||
- **Admin API**: 15+ sub-actions
|
||||
- **MAG Portal**: 40+ type/action combinations
|
||||
- **Enigma2 API**: 10 types
|
||||
- **Streaming**: 5 endpoint patterns
|
||||
|
||||
### Authentication Methods
|
||||
1. Username/Password (most common)
|
||||
2. IP-Based (admin APIs)
|
||||
3. MAC Address + Token (MAG devices)
|
||||
4. Play Token (secure streaming)
|
||||
|
||||
### Security Features
|
||||
- GeoIP country restrictions
|
||||
- ISP locking
|
||||
- IP whitelisting
|
||||
- User agent filtering
|
||||
- Rate limiting (20 req/sec)
|
||||
- Flood protection
|
||||
- Max connection limits
|
||||
|
||||
### Output Formats
|
||||
- Transport Stream (TS)
|
||||
- HLS (M3U8)
|
||||
- MP4, MKV, AVI, FLV, WMV, MOV, 3GP
|
||||
- XML (Enigma2, XMLTV)
|
||||
- JSON (Player/Panel APIs)
|
||||
|
||||
## Source Code Analyzed
|
||||
|
||||
```
|
||||
/home/xtream-codes-decoded/
|
||||
├── wwwdir/
|
||||
│ ├── api.php # Admin API
|
||||
│ ├── player_api.php # Player API
|
||||
│ ├── panel_api.php # Panel API
|
||||
│ ├── system_api.php # System API
|
||||
│ ├── portal.php # MAG Portal (1300+ lines)
|
||||
│ ├── enigma2.php # Enigma2 API
|
||||
│ ├── xmltv.php # EPG/XMLTV
|
||||
│ ├── get.php # Playlist generator
|
||||
│ ├── init.php # Bootstrap
|
||||
│ ├── includes/
|
||||
│ │ ├── functions.php
|
||||
│ │ ├── lib.php
|
||||
│ │ ├── streaming.php
|
||||
│ │ └── mysql.php
|
||||
│ └── streaming/
|
||||
│ ├── clients_live.php # Live streaming
|
||||
│ ├── clients_movie.php # VOD streaming
|
||||
│ └── timeshift.php # Catchup
|
||||
└── nginx/conf/
|
||||
└── nginx.conf # URL routing
|
||||
```
|
||||
|
||||
## Analysis Date
|
||||
December 24, 2025
|
||||
|
||||
## Software Version
|
||||
Xtream Codes v2.9.2
|
||||
Reference in New Issue
Block a user