Skip to content
Xtream Codes API

Xtream Codes API

XUI.live implements the Xtream Codes API — the de facto standard that IPTV player applications speak. Apps your subscribers already use, from IPTV Smarters to TiviMate, connect to a XUI.live panel out of the box: they ask for a server address, a username and a password, and everything else on this page happens behind that login screen.

The endpoint is /player_api.php, authenticated with a line’s credentials:

https://your-panel.com/player_api.php?username=USER&password=PASS&action=ACTION

Authentication and account info

A request with no action returns the account and the server in one response — this is what a player app calls first:

curl "https://your-panel.com/player_api.php?username=USER&password=PASS"
{
  "user_info":   { "username": "USER", "auth": 1, "status": "Active",
                   "exp_date": "1767225600", "max_connections": "1" },
  "server_info": { "url": "your-panel.com", "port": "80",
                   "https_port": "443", "timezone": "Europe/London" }
}

auth: 1 means the credentials are good; status reflects the line’s state — Active, Banned, Disabled or Expired.

The actions

ActionReturns
get_live_categoriesLive channel categories
get_live_streamsLive channels — filter with category_id
get_vod_categoriesMovie categories
get_vod_streamsMovies — filter with category_id
get_vod_info&vod_id=One movie in detail: plot, cast, director, rating, runtime
get_series_categoriesSeries categories
get_seriesThe series list
get_series_info&series_id=Seasons and episodes of one series
get_short_epg&stream_id=The next programmes on a channel
get_epg&stream_id=Full EPG for a channel
get_simple_data_table&stream_id=Full EPG, table form
curl "https://your-panel.com/player_api.php?username=USER&password=PASS&action=get_live_streams"
[
  { "num": 1, "name": "News HD", "stream_type": "live", "stream_id": 1,
    "category_id": "1", "tv_archive": 1, "tv_archive_duration": 1 }
]

tv_archive: 1 tells the app the channel has catch-up — XUI.live’s TV archive — and tv_archive_duration says how many days of it.

Playback URLs

Everything a player needs is derived from the responses above:

ContentURL
Livehttps://your-panel.com/live/USER/PASS/<stream_id>.m3u8 — or .ts
Moviehttps://your-panel.com/movie/USER/PASS/<stream_id>.<ext>
Episodehttps://your-panel.com/series/USER/PASS/<episode_id>.<ext>
Catch-uphttps://your-panel.com/timeshift/USER/PASS/<duration>/<YYYY-MM-DD:HH-MM>/<stream_id>.m3u8

The extension selects the container: .m3u8 for HLS, .ts for MPEG-TS — both served by the same panel, so the choice belongs to the app, not to your infrastructure.

Playlists and EPG for the whole line

Two more endpoints cover apps that consume a playlist rather than the API:

FormatURL
M3U playlisthttps://your-panel.com/get.php?username=USER&password=PASS&type=m3u_plus&output=ts
XMLTV EPGhttps://your-panel.com/xmltv.php?username=USER&password=PASS

The playlist honours the line’s bouquets — a subscriber sees exactly the channels their subscription carries, in the order you arranged them in the panel.

Managing lines programmatically — creating them when a customer pays, disabling them when one lapses — is the Admin API’s job, or the Reseller API’s when the integration acts for a reseller.