Xtream Codes API Login
Xtream Codes uses three fields: a server URL plus a username and password, instead of a long playlist link. It is the cleanest way to log in and the easiest to manage.
What you need
| Field | Example |
|---|---|
| Host / Server URL | http://example.com:8080 |
| Username | your_username |
| Password | your_password |
Step-by-step
-
Step 1: Choose Xtream Codes
In your player pick "Xtream Codes API" or "Xtream Login" instead of M3U.
The Xtream Player login screen. “Streams API” is the Xtream Codes option: pick it instead of “M3U Playlist”, then fill in the server URL, username and password from your provider. -
Step 2: Enter the three fields
Type the host, username and password exactly as issued. Include the port if one is given.
The Xtream Codes form filled in. The server address includes the port (normally :8080). Leave “Include TV channels” and “Include VOD” ticked, then choose Next. -
Step 3: Add the profile
Save, and the player builds the M3U and EPG links for you automatically.
TiviMate downloads and parses the playlist, then reports how many channels it found. Give the playlist a name and pick “TV playlist”.
Which players support it
TiviMate, IPTV Smarters Pro and Xtream Player all support Xtream Codes.
What the three fields actually mean
Xtream Codes is a login protocol, not a separate IPTV service. The player sends your username and password to the provider’s player_api.php endpoint. If the line is active, the provider returns your categories, channel list, VOD and EPG addresses; the player then builds every stream URL itself.
That is why the login only needs three fields:
- Host — the provider’s server URL, usually with a port, for example
http://example.com:8080. - Username — the name on your line, not your email address.
- Password — the line password, not your email or dashboard password.
The host is the field people get wrong. A username and password can be perfect and the login will still fail if the host has the wrong port, the wrong protocol, or a path left on the end.
Where to find your Xtream details
| Source | What to look for |
|---|---|
| Provider email or chat | “Xtream Codes”, “API”, “Host”, “Server URL”, “Username”, “Password”. The host often includes a port. |
| Provider dashboard | Open “My services”, “Account” or “Subscription”. Some panels label the host as “URL” or “DNS”. |
| An M3U link | The host is everything before /get.php. The username and password are the username= and password= values in the query string. |
| A screenshot from the provider | Copy the values by hand. Screenshots often hide the port or cut off the last characters. |
If the provider only sent an M3U link, you can still use Xtream. Take the part before /get.php as the host, and the two query values as the username and password.
The host field is where most logins fail
Use the exact URL the provider gave you, including the port. Do not add /player_api.php to the host field: the app adds that path itself. Do not add a trailing slash. If the app has separate fields for protocol, host and port, split the URL into those fields instead of pasting the whole thing into one box.
Two common mistakes:
- Wrong protocol.
https://only works if the provider’s server has a valid certificate on that port. If it does not, usehttp://. - Wrong port. A host without a port is not the same as a host with port 8080. Use the number the provider sent; do not guess.
Test the API URL before you change the app
Open this URL in a browser, replacing the host, username and password:
http://example.com:8080/player_api.php?username=USER&password=PASS
- If you see a JSON object with
user_infoandserver_info, the line and the host are working. The app is the problem. - If
user_info.authis0, the username or password is wrong, or the line is expired. - If the browser times out, the host, port or protocol is wrong, or the server is down.
- If you see a 404 page, the host is probably missing the correct port or has an extra path.
This test gives you a clear answer in under a minute, and it gives your provider the exact URL that failed.
Common Xtream errors and fixes
| Error | What it usually means | Fix |
|---|---|---|
| 401 Unauthorized | Wrong username or password, expired line, or the API is disabled | Re-type both fields; they are case-sensitive. If they are correct, ask the provider to check the line and API access. |
| “Invalid host” or connection refused | Wrong port, wrong protocol, or a path left in the host field | Use http://host:port or https://host:port; remove /player_api.php and any trailing slash. |
| “API disabled” | The provider turned off Xtream for your line | Use the M3U URL instead, or ask the provider to enable the API. |
| Login works, but no channels | Expired subscription, or no channel package attached | Ask the provider to confirm the line is active and the bouquet is assigned. |
| “Too many connections” | Another device is streaming on the same line | Close other players and TVs. If the plan allows one connection, only one device can watch. |
| SSL or certificate error | The host’s HTTPS certificate is invalid or expired | Try http:// instead of https://, or ask for the current host. |
| Timeout | Server down, wrong port, or ISP blocking | Open the API URL in a browser. If it times out, try another network or a VPN and contact the provider. |
| Works in one app, not another | Old app version, or a cached failed profile | Update the app, delete the profile, and add it again. |
Device notes
| Device or app | What to check |
|---|---|
| TiviMate | Add playlist → Xtream Codes → host, username, password. Leave VOD on if you want movies and series. |
| IPTV Smarters | Choose “Login with Xtream Codes API”. The host field takes the full URL with the port. |
| XCIPTV | Choose Xtream Codes API. If the app splits host and port, put the port in its own field. |
| Formuler MyTVOnline | Use “Xtream Codes”, not “Portal”, when you have a host, username and password. |
| Smart TV | Many TV apps only accept M3U. Build the M3U URL from the same host and credentials. |
| Firestick | Use the app’s phone/QR login where possible. Typing a host and password with the remote causes most 401 errors. |
Before you contact your provider
- The host starts with
http://orhttps://and includes the port if one was given. - There is no
/player_api.php, no trailing slash and no space in the host. - The API test URL returns JSON, not an error page.
- The username and password are case-sensitive and have no extra spaces.
- The line is active and allows the number of devices you are using.
- The app is updated, and the old profile was deleted before adding a new one.
- A second app gives the same error. If yes, the line or host is the problem.
- You have the exact error text and a screenshot for the provider.
Keep the login private
Your Xtream password controls the line. Do not share the host, username and password in a screenshot, a forum post or a public chat. If the details leak, ask the provider to reset the password; the old M3U link and any saved profiles stop working, and you receive a new set.
Xtream or M3U?
Xtream is easier to retype on a TV and easier to update when the provider changes a port. M3U works in more players, including VLC, Kodi and some Smart TV apps. If you have both, use Xtream in TiviMate or Smarters and keep the M3U link as a backup for devices that cannot log in with three fields.
Xtream Codes API Login: FAQ
What is Xtream Codes?
Xtream Codes is an IPTV panel and login protocol. Providers give you a host, username and password that players use to fetch channels and VOD.
Is Xtream Codes the same as M3U?
They fetch the same streams. Xtream uses three fields and auto-generates the M3U URL; M3U makes you paste that URL yourself.
Why does my Xtream login fail?
Check the port and any http vs https prefix. A wrong port is the most common cause of a failed login.
What port should I use for Xtream Codes?
Use the port in the provider host. If none is given, try 80 with http and 443 with https; do not guess random ports.
Can I use Xtream Codes on a Smart TV?
Only if the TV app supports it. Otherwise ask the provider for the M3U URL built from the same line.
Not sure which player to install?
Compare every player we tested side by side, or jump straight to the setup guide for your device.