Files
XC_VM/docs/en/api/playlist.md
T
Divarion-D 040143215a docs: Full Docsify documentation (EN + RU) and migration replacement
Full bilingual documentation for XC_VM has been added
with Docsify SPA and the outdated database migration has been replaced.

## Docsify

- docs/index.html — SPA entry point: en-us/ru-ru routing,
search, syntax highlighting (bash, PHP, SQL, nginx, JSON)

## EN Documentation

- docs/en/info/faq.md — FAQ (12 questions: streams, access, database, SSL, updates, permissions)
- docs/en/info/migration_guide.md — migration guide from other systems
- docs/en/info/update.md — step-by-step update via the web panel
- docs/en/info/watch_folder.md — Watch Folder: workflow, PTN/guessit parsers, configuration
- docs/en/updates_checklist.md — release preparation checklist

## RU Documentation (fully localized)

- docs/ru/README.md — Main Page
- docs/ru/_sidebar.md — Sidebar Navigation
- docs/ru/administration/ssl-generation.md — Self-Signed SSL Generation
- docs/ru/administration/update-system.md — Update Mechanism (PHP → Python → Post-Update)
- docs/ru/api/playlist.md — Playlist API with Error Codes
- docs/ru/api/system_api.md — System API (13 endpoints)
- docs/ru/api/xtreamcodes_api.md — XtreamCodes API (Authorization, Live, VOD, TV Series, EPG)
- docs/ru/builds/build_binaries.md — nginx build, nginx_rtmp, PHP-FPM, network
- docs/ru/builds/build_ffmpeg.md — Building FFmpeg 8.0 with NVENC/CUDA
- docs/ru/builds/build_system.md — MAIN vs. LB build system
- docs/ru/development/cli-tools.md — CLI: 26 commands, 25 crons, 8 daemons, database migrations
- docs/ru/info/faq.md — FAQ (12 questions)
- docs/ru/info/migration_guide.md — Migration guide
- docs/ru/info/update.md — Updating via the control panel
- docs/ru/info/watch_folder.md — Watch Folder
- docs/ru/updates_checklist.md — Release checklist

## Migrations

- Removed: 001_drop_watch_folders_plex_token.sql (Deprecated)
- Added: 001_update_crontab_filenames.sql — removes the .php suffix from filenames in the crontab table (switches to console.php commands)
2026-03-15 00:02:19 +03:00

4.4 KiB

📺 Get Playlist

This API provides authentication and playlist generation features for XC_VM. Clients can authenticate using a username/password or token, after which a personalized playlist is generated.


📚 Navigation


📂 File Location

The playlist API is handled by PlaylistApiController:

src/public/Controllers/Api/PlaylistApiController.php

🔑 Authentication

The API requires authentication either via username and password or via token. This ensures secure access to the content.

Base URL

http://<your-domain>:80/playlist

🚀 Endpoints

1. Authentication and Playlist Generation

Method & Endpoint:

GET /

Query Parameters:

Parameter Type Required Description
username string Yes* Username for authentication (required if token is not used).
password string Yes* Password for authentication (required if token is not used).
token string Yes* Authentication token (required if username and password are not used).
type string No Device type (default: m3u_plus).
key string No Content type (live — live TV, movies — movies, radio_streams — radio, series — TV shows).
output string No Output format (hls or m3u).
nocache boolean No If true, disables caching.

💡 Yes — one option is required: either username/password or token.

Example Requests:

curl -X GET "http://<your-domain>:80/playlist/username/password/type&output=hls&key=live"
curl -X GET "http://<your-domain>:80/playlist/token/type&output=hls&key=live"

Response:

  • Playlist file in the requested format (M3U or HLS).

❌ Error Codes

If an error occurs, the API returns the corresponding error codes for easier troubleshooting.

Error Code Description
NO_CREDENTIALS Missing authentication data.
INVALID_CREDENTIALS Invalid username, password, or token.
BLOCKED_USER_AGENT User agent is blocked.
EXPIRED Account has expired.
DEVICE_NOT_ALLOWED Device type is not allowed.
BANNED User is banned.
DISABLED Account is disabled.
EMPTY_USER_AGENT User agent is required but missing.
NOT_IN_ALLOWED_IPS IP address is not allowed.
NOT_IN_ALLOWED_COUNTRY Country is not allowed.
NOT_IN_ALLOWED_UAS User agent is not allowed.
ISP_BLOCKED ISP is blocked.
ASN_BLOCKED ASN restriction applied.
DOWNLOAD_LIMIT_REACHED Too many requests.
GENERATE_PLAYLIST_FAILED Failed to generate playlist.

⚠️ Tip: Check server logs for more details if errors occur.


🧾 Notes

  • Query Parameters: Make sure all parameters are provided correctly to avoid authentication errors.
  • Restrictions: The API applies filters by user agent, IP address, and country to enhance security.
  • Rate Limiting: Request limits are enforced to prevent server overload.
  • Recommendations: Use tools like cURL or Postman for testing. In production, integrate this API into your application for automated playlist generation.

💬 If you have integration questions, open an issue in the repository.