Xtream Codes style links
If your provider gave you a server, a username and a password, or a link that contains get.php, the service uses an Xtream Codes style API. This page explains those links and how to use them in TS IPTV.
TS IPTV includes no channels and recommends no provider. Every example uses the placeholder server provider.example.com, username U and password P.
What it is
“Xtream Codes” is the name of panel software that many IPTV providers use to manage subscribers and streams. It is a provider API, not a file format: the provider's server generates an M3U playlist, an XMLTV guide and JSON data for your account. There is no official public specification; the structure below is the one open-source players use. Whether a provider is licensed to carry its channels is a question about that provider, not about the software it runs.
The link contains your username and password. Do not share it, post it online or take screenshots that show it. Anyone who has the link can use your account.
URL structure
http(s)://provider.example.com:8080 is the server and port your provider gave you; U is the username, P the password.
| Purpose | URL |
|---|---|
| M3U playlist | …/get.php?username=U&password=P&type=m3u_plus&output=tstype=m3u_plus: with names, logos, groups and tvg-id; type=m3u: without. output=ts (MPEG-TS) or output=m3u8 (HLS). |
| Account information (JSON) | …/player_api.php?username=U&password=PReturns user_info (status, expiry date, maximum connections…) and server_info. |
| Categories and channel lists (JSON) | …/player_api.php?username=U&password=P&action=get_live_categories…&action=get_live_streams (add &category_id=X to filter) |
| Films and series (JSON) | …&action=get_vod_categories, get_vod_streams, get_vod_info&vod_id=X, get_series_categories, get_series, get_series_info&series_id=X |
| XMLTV guide | …/xmltv.php?username=U&password=P |
| One live channel | …/live/U/P/<stream_id>.ts (or .m3u8) |
| One film / one episode | …/movie/U/P/<id>.<ext>, …/series/U/P/<id>.<ext> |
| Catch-up | …/timeshift/U/P/<minutes>/<YYYY-MM-DD:HH-MM>/<stream_id>.ts |
Example
This is the playlist link you paste into TS IPTV. There is no file to download: the provider's server generates the list for your account each time it is fetched.
http://provider.example.com:8080/get.php?username=U&password=P&type=m3u_plus&output=ts
What it returns is an ordinary M3U playlist. Some providers add a guide link to the first line, for example #EXTM3U url-tvg="…/xmltv.php?username=U&password=P". Each channel points to a /live/U/P/… link.
Create one
Not applicable: the provider's server generates the list; you do not write it.
Hosting
Not applicable: your provider hosts the list, the guide and the streams.
Add it in TS IPTV
With the server, username and password your provider gave you, use the Xtream Codes tab; nothing has to be typed into a link:
- Open Add IPTV Source and choose the Xtream Codes tab at the top.
- Optionally enter a Source Name. Left empty, the playlist is named after the server, for example
provider.example.com. - Enter the Server with its port, for example
http://provider.example.com:8080. Withouthttp://orhttps://, TS IPTV useshttp://; a/get.phpor/player_api.phpat the end is ignored. You can also paste the wholeget.phplink here: the server, username and password are filled in from it. - Enter the Username and the Password (hidden; the eye button, or Show password on a TV, shows it), then choose Add IPTV.
TS IPTV first asks the server whether the account is active (player_api.php). A wrong username or password, an expired or disabled account and a server that cannot be reached each get their own message. If the server does not answer that question (some panels block it), the playlist is added anyway. TS IPTV then imports …/get.php?username=U&password=P&type=m3u_plus&output=ts and adds the programme guide …/xmltv.php?username=U&password=P by itself. Special characters in the username or password are encoded for you.
A get.php link pasted into Source Link on the Link tab still works, and gets the same xmltv.php guide when the list does not name one in url-tvg or x-tvg-url.
TS IPTV does not send your username, password or this link to analytics.
Common mistakes
| Mistake | Symptom | Fix |
|---|---|---|
Using type=m3u | Channels without groups, logos or guide | Use type=m3u_plus. |
Pasting the player_api.php link | Not recognised as a playlist | That is a JSON API, not a playlist; use get.php. |
Wrong port, or https when the server only speaks http (or the reverse) | Cannot connect | Use exactly the server, port and protocol your provider gave you. |
| The account has expired or is suspended | An empty list, or “The server refused this stream” | Check the account with your provider. |
| Too many connections (several devices watching) | Channels stop or are refused | Stop playback on the other device. |
Channels do not play on iOS with output=ts | Playback error | Try output=m3u8 (HLS). |
| Sharing the link, or a screenshot that shows it | Someone else uses your account | Change your password with the provider. |
What TS IPTV supports
| Feature | Status |
|---|---|
get.php playlists (m3u, m3u_plus) | Supported on every platform |
The xmltv.php guide | Supported Added automatically for get.php playlists, or through the list's url-tvg/x-tvg-url |
| A separate Xtream login screen (server, username, password) | Available The Xtream Codes tab of Add IPTV Source, on every platform |
Films and series through player_api.php | Not supported Only the entries in the M3U list. |
Catch-up (catchup="xc") | Stored, playback coming later |