A lightweight mock server that simulates Xtream Codes API endpoints for IPTV application development and testing, deployed on Cloudflare Workers.
This project is intended for testing the Wizju IPTV Player (https://github.com/j2jstudio/wizju-iptv-player). The online player for live testing is available at https://wizju.com/iptv-online-player.
- Username:
test_user - Password:
test_pass
- Node.js and pnpm installed.
- A Cloudflare account.
- Wrangler CLI installed and configured.
-
Clone the repository:
git clone https://github.com/j2jstudio/xtream-codes-mock-api.git cd xtream-codes-mock-api -
Install dependencies:
pnpm install
-
Run the development server:
pnpm dev
The mock server will be running on
http://localhost:8787.
To deploy the mock server to your Cloudflare account, run:
pnpm deployAfter deployment, Wrangler will provide you with the URL to your live worker.
You can use any IPTV client or testing tool (like Postman or Bruno) to interact with the API.
- Player API URL:
https://<your-worker-url>/player_api.php - Username:
test_user - Password:
test_pass
Authenticate and get user info:
curl "https://<your-worker-url>/player_api.php?username=test_user&password=test_pass"Get live stream categories:
curl "https://<your-worker-url>/player_api.php?username=test_user&password=test_pass&action=get_live_categories"Get live streams:
curl "https://<your-worker-url>/player_api.php?username=test_user&password=test_pass&action=get_live_streams"https://xtream-codes-mock-api.wizju.com/player_api.php?username=test_user&password=test_pass
https://xtream-codes-mock-api.wizju.com/player_api.php?username=test_user&password=test_pass&action=get_live_categories
https://xtream-codes-mock-api.wizju.com/player_api.php?username=test_user&password=test_pass&action=get_live_streams
https://xtream-codes-mock-api.wizju.com/player_api.php?username=test_user&password=test_pass&action=get_live_streams&category_id=1
https://xtream-codes-mock-api.wizju.com/player_api.php?username=test_user&password=test_pass&action=get_vod_categories
https://xtream-codes-mock-api.wizju.com/player_api.php?username=test_user&password=test_pass&action=get_series_categories
https://xtream-codes-mock-api.wizju.com/player_api.php?username=test_user&password=test_pass&action=get_series
https://xtream-codes-mock-api.wizju.com/player_api.php?username=test_user&password=test_pass&action=get_series_info&series_id=1
This project was inspired by the excellent work on bsogulcan/xtream-codes-mock-server. A big thank you to the original author for providing a great foundation.