Setup & Troubleshooting

Xtream Codes explained: what the IPTV login is, how the API works, and what its errors mean

By Henry Hopkins · Reviewed by IPTV Americans Editorial Team · Published · · 22 min read

TL;DR

Xtream Codes is an IPTV login format. Your provider gives you a server URL, a username and a password, and your player uses them to fetch channels, movies, series, the guide and your account status through one API. The company that created it closed in 2019. The format it popularised is still what most IPTV players mean by "Xtream Codes".

Diagram of an Xtream Codes login: server URL, username and password combine into one login that loads live TV, movies and series, the TV guide and account status
Three details from your provider, one login that fetches everything else.

What is Xtream Codes?

Xtream Codes is a way of logging an IPTV player into a subscription. Instead of pasting one long playlist address, you enter three separate details your provider issued — a server URL, a username and a password — and the player uses them to ask the provider's server for everything else: the live channel list, the movie and series libraries, the programme guide, and the status of your account.

The name refers to an API — a fixed set of addresses and responses that a player and a server both understand. That shared language is the whole point. A provider running a compatible server and a player that supports the format can work together without either knowing anything else about the other, which is why the same three credentials work in TiviMate, IPTV Smarters Pro and many other players.

Two things Xtream Codes is not, because both get confused constantly:

Our glossary entry for Xtream Codes gives the one-line definition. This page covers the mechanism: what the three details actually do, what the server sends back, how it compares with an M3U playlist, and how to read the errors.

The three details your provider gives you

An Xtream Codes login always comes as the same three pieces, usually in an activation email or message:

DetailWhat it looks likeWhat it does
Server URLhttp://your-provider-host:8080Tells the player which server to talk to, over which protocol and port
UsernameA string of letters and numbersIdentifies your account on that server
PasswordA second string, often randomProves the request is yours

The server URL has three parts, and each one matters. The protocol is http:// or https://. The host is the server's name. The port is the number after the colon. Many providers run on a non-standard port, and if you leave it off, the player knocks on a door nobody is answering.

The entry mistakes behind most failed logins

When a login fails, the details are usually almost right. These account for the large majority of failures that turn out not to be anything wrong with the account:

The fix for nearly all of these is the same: copy and paste each detail from the activation message instead of typing it. On a TV, where pasting is rarely possible, enter each detail slowly and compare it with the activation message character by character before you submit. Two minutes of checking beats twenty minutes of troubleshooting a typo.

How the Xtream Codes API works

When you press log in, the player does not download one big file. It holds your credentials and makes a series of short, specific requests to the server, each asking for one piece of the picture. That design is what separates Xtream Codes from a plain playlist, and it explains almost every behaviour you will notice.

Four-step diagram of the Xtream Codes API: a login check through player_api.php, fetching the catalogue in sections, building each stream URL from a channel ID, and loading the guide from xmltv.php
Not one big download — a series of short requests using the same login.

Step 1: the login check

The first request goes to an address ending in player_api.php, with your username and password attached:

http://your-provider-host:8080/player_api.php?username=USERNAME&password=PASSWORD

The server replies with a small block of JSON describing your account and the server itself. A trimmed, anonymised example looks like this:

{
  "user_info": {
    "username": "USERNAME",
    "auth": 1,
    "status": "Active",
    "exp_date": "1798761600",
    "is_trial": "0",
    "active_cons": "1",
    "max_connections": "2",
    "allowed_output_formats": ["m3u8", "ts"]
  },
  "server_info": {
    "url": "your-provider-host",
    "port": "8080",
    "https_port": "8443",
    "server_protocol": "http",
    "timezone": "America/New_York"
  }
}

The field that decides everything is auth. A 1 means the server recognised the credentials. A 0 — or a reply with no account details in it at all — means it did not. Exact field names and formats vary slightly between server panels, so treat this as the shape rather than a byte-exact specification.

Step 2: fetching the catalogue in sections

Once the login is accepted, the player goes back to the same player_api.php address with an extra action telling the server what it wants next. Live channel groups, then the channels in them. Movie categories, then the films. Series, then seasons and episodes when you open one. Each is its own request with its own response.

This is why a first load can take a minute on a large subscription, and why the parts can fail independently. The live list can arrive while the series library does not. It is also why a manual update playlist in the player fixes more problems than reinstalling does: it re-runs these requests without throwing away your settings.

Step 3: building each stream address

The channel list does not contain ready-made video links. It contains an ID for each channel, and the player assembles the stream address itself when you press play, from the server URL, your credentials and that ID:

http://your-provider-host:8080/live/USERNAME/PASSWORD/12345.ts

Movies and series episodes follow the same pattern under /movie/ and /series/, ending in the file's own extension. The ending on a live address — .ts for an MPEG-TS stream or .m3u8 for HLS — is the stream format. The allowed_output_formats field in the login reply is the server telling the player which ones it will serve. That field is behind a useful fix covered in the errors section.

Step 4: the programme guide

The guide comes from the same login but through a separate address, xmltv.php, which returns the full schedule as an XMLTV file. There is also a per-channel get_short_epg action that players use to fill in now-and-next quickly. The guide being a separate feed is why channels can play while the grid sits empty. That problem has its own page: our IPTV EPG guide covers how the schedule is built, matched to channels and fixed.

The Xtream Codes endpoints at a glance

You never need to type these into a player — it builds them for you. They are listed here because knowing them makes support conversations and self-testing far quicker. USER and PASS stand for your own credentials.

AddressWhat comes back
player_api.php (no action)Account status and server details, as JSON
action=get_live_categories
action=get_live_streams
Live channel groups, then the channels in them
action=get_vod_categories
action=get_vod_streams
action=get_vod_info
Movie categories, the films, and one film's details
action=get_series_categories
action=get_series
action=get_series_info
Series categories, the series, and one series' seasons and episodes
action=get_short_epgNow and next for one channel. Titles arrive Base64-encoded
xmltv.phpThe full programme guide as an XMLTV file
get.php?type=m3u_plusThe same lineup exported as an M3U playlist
/live/USER/PASS/ID.tsOne live channel's stream
/movie/USER/PASS/ID.mp4One film, with its own file extension
/series/USER/PASS/ID.mkvOne episode, with its own file extension

Every row except the last three uses the same starting address: http://your-provider-host:8080/ followed by the file name, with ?username=USER&password=PASS attached and, for the player_api.php rows, &action=… after it.

Notice the get.php row. An M3U playlist from an Xtream Codes provider is usually generated from the same account through that address. The two methods are not rival systems. They are two doors into the same account, which leads straight to the most practical question.

Xtream Codes vs M3U: which should you use?

Use Xtream Codes when your provider offers it. An M3U URL is a perfectly good fallback, but it is the less capable of the two for everyday viewing. An M3U playlist is a single text file listing channels and their stream addresses. Xtream Codes is a live conversation with the server, and that difference shows up in everything a player can do.

Comparison of Xtream Codes and M3U: both include live channels, while Xtream Codes adds movies and series, an automatic TV guide and account expiry details that M3U often lacks
Two doors into the same account. Xtream Codes opens the wider one.
Xtream Codes loginM3U playlist URL
What you enterServer URL, username, passwordOne long URL
Live channelsYesYes
Movies and seriesYes, as browsable librariesOften missing, depending on how the playlist was generated
Programme guideUsually found automaticallyUsually needs a separate EPG URL
Expiry date and connection limitShown in the playerNot available
If the provider changes the playlist addressNothing to re-enterPaste the new URL by hand
How it loadsIn sections, as the player needs themOne file downloaded and read in full
Works inDedicated IPTV playersAlmost anything, including general media players such as VLC

When M3U is the better choice

There are real cases for it. Use an M3U URL when your player does not offer an Xtream Codes option at all, when you only want live channels in a general-purpose media player, or when you are deliberately building one custom list from a trimmed-down playlist. Some set-top boxes and older apps only accept M3U, and for live TV alone that is completely adequate.

The one thing to expect when you choose M3U is a smaller picture: channels without the on-demand library, and a guide you may have to add by hand. If you switched to M3U and your movies disappeared, that is why — not a fault with your subscription.

Xtream Codes vs a MAC or Stalker portal

You may see a third option on some devices, particularly MAG set-top boxes: a portal URL that authenticates by your device's MAC address instead of a username and password. That is a different system with different behaviour. Our glossary entry on Stalker Portal explains it. If your provider offers both and your device supports Xtream Codes, the login is generally the easier of the two to move between devices.

What your player can read about your account

The login reply is why players can show your account details without your provider building anything specially for them. The fields worth knowing:

Because this comes straight from the provider's server, the expiry your player displays is the provider's own record. If it differs from the date you remember, the player is not wrong; it is the one to raise with your provider.

Xtream Codes errors and what they actually mean

Most error messages here are the player accurately passing on what the server said, or reporting that the server never answered. The first diagnostic question is always the same: does the channel list load at all? If it does, your credentials are fine, and the problem is further along.

What you seeWhat it usually meansWhat to do
"Invalid username or password", "Authorization failed", or a generic login failureThe server did not accept the credentials as enteredPaste all three details from your activation message; check for spaces, capitals and O versus 0
Login spins, then times outThe player never reached the server: wrong URL, port or protocol, or a network blocking the portCheck http versus https and the port number, then try a different network
"Account expired" or status ExpiredThe subscription period has endedRenew; the expiry in the player is the provider's record
"Max connections reached", or plays on one device but not a secondThe account's simultaneous-stream limit is in useStop playback on other devices, close background players, wait a minute and retry
Status Banned or DisabledThe provider has suspended the loginContact the provider; shared credentials are a common trigger
Channel list loads, but streams will not playLogin is fine; the problem is the stream itself or the stream formatTry another channel, then switch the player's stream format between TS and HLS
One channel fails, the rest playA source problem with that single streamReport the exact channel name; nothing on your device will fix it
Live TV works, movies and series are emptyAn M3U login, or the on-demand request failedUse the Xtream Codes login, then run a manual playlist update
Channels play, guide is blankThe guide feed, not the loginSee the EPG guide and EPG fixes
Works on home Wi-Fi, fails on mobile data or a VPNThe server's port is blocked on that networkTest with the VPN off or on another network; the account is fine

"Invalid credentials" when the details are definitely right

This is the most frustrating version, and it has a short list of causes. Some players show the same generic login failure for an expired or disabled account as for a typo, so a correct password can still produce it. The server URL may also have changed — providers occasionally move to a new host and send the new address in a notice that is easy to miss. The self-test below separates these in under a minute, because the raw reply tells you exactly which it is.

Why switching the stream format fixes some playback failures

Most players let you choose the stream format — often labelled MPEG-TS and HLS, or .ts and .m3u8. The server only serves the formats listed in allowed_output_formats, and devices differ in how well they handle each one. When channels load but will not start, or start and stall immediately, switching format is a quick, reversible test that isolates a device-side playback problem from a stream-side one. If neither format plays any channel, the issue is not the format; see our IPTV troubleshooting guide for the wider diagnostic path.

"Max connections" when nobody else is watching

The server counts open streams, not people. A player left running in the background on another device, a TV that was switched off at the wall mid-stream, or a phone that lost connection without closing the stream properly can all hold a connection open for a short time. Waiting a minute or two usually releases it. If the limit is reached repeatedly with no other devices in use, the credentials may have been shared or leaked — which is a reason to ask your provider for a new password, covered under keeping your login private.

Test your Xtream Codes login yourself

You can see exactly what the server says about your account, which settles most "is it me or them?" questions immediately. On any computer with a terminal, on the same network as your TV, run the login request directly:

curl -s "http://your-provider-host:8080/player_api.php?username=USER&password=PASS"

Then read the reply:

Two cautions. The command puts your password in your terminal history, so do not run it on a shared or work computer. And never paste your login into an online "IPTV checker" website to test it — that hands your subscription to a stranger, which is the subject of the next section.

Keeping your Xtream Codes login private

Anyone who has your server URL, username and password has your subscription. There is no second factor and no device pairing. That makes a few habits worth adopting:

What "free Xtream Codes" lists actually are

Searches for this topic turn up a steady supply of posted usernames and passwords. A working one is either somebody else's paid account or an unauthorised one. It stops without warning when the owner changes the password or the provider disables it, it collides with that account's connection limit, and there is no telling what server you are connecting to or who is logging your traffic. The only credentials worth using are the ones your own provider issued to you.

Where to enter Xtream Codes in your player

The option has slightly different names from app to app, but it is always in the add-playlist or login screen, and it always asks for the same three details. Look for any of these labels:

If a player offers only an M3U option, you can still use your subscription through an M3U URL, with the trade-offs in the comparison above. For device-specific install steps before you reach the login screen, start with our Firestick guide.

Where the name came from: the 2019 shutdown and the 2021 ruling

Almost every page on this topic either skips the history or gets it half right. The accurate version is worth knowing, because it explains why the name still appears in players, and it draws a line that matters.

The company and its software

Xtream Codes began as the name of a company, Xtream Codes Ltd, whose management software let IPTV operators run services: handling customer accounts, connection limits and the delivery of streams through a standard API. The software itself supplied no content. What flowed through it depended entirely on the operator using it.

September 2019: the shutdown

In September 2019, a coordinated operation led from Naples, involving Italy's Guardia di Finanza and coordinated through the EU agency Eurojust, took the platform offline, with raids and server seizures in several European countries. Many IPTV services built on it went dark overnight. The scale reported at the time varied considerably between accounts — figures ranged from hundreds of thousands of direct customers to claims of tens of millions of end users — and TorrentFreak's coverage that week questioned how some of those totals had been reached.

August 2021: the appeals court

The part most accounts leave out came later. According to TorrentFreak's June 2022 report, on 3 August 2021 the Court of Appeals of Naples found no evidence that Xtream Codes Ltd had acted illegally at any point between its start in 2015 and its closure in 2019. The court found that the company's revenue had been counted by adding up all of its invoices rather than by showing any of it came from illegal activity, and the seized revenue was released. The prosecutor's appeal to Italy's Supreme Court of Cassation was dismissed.

What that ruling does and does not mean

The ruling concerns the company and its software. It says nothing about whether any IPTV service that used the software — then or now — had the rights to what it streamed. That is the same distinction that runs through every player page on this site: the software is not the content. A login format tells you how a player connects; it tells you nothing about whether the service on the other end is licensed. Our guide to legal IPTV services covers how to tell the difference.

Sources

What "Xtream Codes" means today

When a player offers an Xtream Codes option today, it means the API format — not the company, and not any connection to it. After the 2019 shutdown, other server software appeared that speaks the same player_api.php language, and players kept the familiar label because it told users exactly which three details to enter. Xtream Codes Ltd itself publicly stated, in January 2020, that it had nothing to do with Xtream UI, one of the projects that emerged afterwards using a similar approach.

The practical upshot for a viewer is simple. The name on the login screen describes the shape of the login. The server behind it belongs to whichever provider issued your credentials, and everything about the quality, reliability and lawfulness of the service comes from that provider rather than from the format.

That is also the right lens for choosing one. A provider that issues Xtream Codes credentials is not better or worse for doing so. What matters is what sits behind the login: whether channels stay up on the nights that matter, whether the guide is complete, whether broken streams get fixed when reported, and whether the service is honest about what it carries. Our guide to choosing an IPTV service works through those questions.

Quick reference: Xtream Codes terms in one place

TermWhat it is
Xtream CodesAn IPTV login format: server URL, username and password, used through a standard API.
Server URLThe provider's server address: protocol, host and port, such as http://host:8080.
player_api.phpThe address a player logs in through and fetches the catalogue from.
actionThe part of a request saying what the player wants next, such as get_live_streams.
xmltv.phpThe address serving the full programme guide.
get.phpThe address that exports the lineup as an M3U playlist.
authLogin result in the reply: 1 accepted, 0 rejected.
exp_dateAccount expiry as a Unix timestamp.
max_connectionsHow many streams may run at the same time.
active_consHow many streams are running now.
Stream formatMPEG-TS (.ts) or HLS (.m3u8); switchable in most players.
M3UA single playlist file of channels and stream addresses; the alternative to an Xtream Codes login.
MAC / Stalker portalA different login system that authenticates the device's MAC address.

Frequently asked

What is Xtream Codes in IPTV?

Xtream Codes is a login format for IPTV. Instead of one long playlist URL, your provider gives you a server URL, a username and a password, and your player uses them to fetch live channels, movies, series, the programme guide and your account status through a standard API. The name comes from a software company that closed in 2019; the format it popularised is still widely supported by IPTV players.

Is Xtream Codes the same as an IPTV service?

No. Xtream Codes describes how your player logs in, not who supplies the channels. The server URL, username and password come from your IPTV provider, and the channels, guide and on-demand library all come from that provider's servers. A player that supports Xtream Codes, such as TiviMate or IPTV Smarters Pro, contains no content of its own.

Should I use Xtream Codes or M3U?

Use Xtream Codes when your provider offers it. It carries live TV, movies, series and the guide through one login, shows your expiry date in the player, and needs nothing re-entered if the provider changes its playlist address. An M3U URL is a good fallback for live TV only, or for players without an Xtream Codes option, but it often arrives without the on-demand library and needs the guide added separately.

What is the server URL in Xtream Codes?

It is the address of your provider's server: a protocol, a host name and usually a port number, for example http://your-provider-host:8080. Enter it exactly as issued, including the port, and with nothing after it such as get.php or player_api.php. A missing port or the wrong http versus https prefix is one of the most common reasons a correct username and password still fails.

Why does my Xtream Codes login say invalid username or password?

Usually because the details differ by one character: a space copied at the end, a capital letter added by autocorrect, or a letter O entered as a zero. Paste them from your activation message rather than typing. If they are exact, check the server URL and port, and whether the account has expired or been disabled, since some players show the same generic login failure for all of these.

What does max connections reached mean?

Your account allows a set number of streams at the same time, and that many are already running. It happens when more devices are watching than your plan allows, when a player on another device is still holding a stream open in the background, or when the login has been shared. Stop playback on the other devices, wait a minute or two, and try again.

Can I see when my Xtream Codes subscription expires?

Usually, yes. The account information returned at login includes the expiry date, the connection limit and how many streams are active, and players such as TiviMate and IPTV Smarters Pro display it in their account or playlist details. That date comes straight from your provider's server, so it is the record to trust if it differs from what you remember.

Why do live channels work but movies and series are empty?

If you logged in with an M3U URL, that is expected, because many M3U playlists carry live channels only. Switch to the Xtream Codes login for the same account and refresh. If you are already using Xtream Codes, run a manual playlist update, since the movie and series libraries are fetched by separate requests from live TV and can fail on their own.

Why does Xtream Codes work on Wi-Fi but not on mobile data or a VPN?

Many providers run their servers on a non-standard port such as 8080, and some mobile networks, VPNs, public Wi-Fi networks and router filters block uncommon ports. The login request never reaches the server, so it looks like a failed login. Test once on a different network or with the VPN off; if it works there, the network in between is the cause, not your account.

Are free Xtream Codes lists safe to use?

No. A working username and password on a free list is somebody else's paid account or an unauthorised one. It can stop at any moment, it collides with that account's connection limit, and there is no way to know what server you are really connecting to or who is logging the traffic. The only credentials worth using are the ones your own provider issued to you.

Is Xtream Codes illegal?

Xtream Codes is a login and management format, and a format is not content. The company behind the original software was taken offline in a 2019 police operation, but according to TorrentFreak's reporting, the Court of Appeals of Naples found in 2021 that there was no evidence the company itself had acted illegally. That ruling concerns the software company. Whether a particular IPTV service is lawful depends on whether it holds the rights to what it streams, not on the login format it uses.

Does Xtream Codes still exist?

The company does not. Xtream Codes Ltd stopped operating after the September 2019 raids. What survived is the API format its software popularised, the player_api.php style of login that providers and players still use. When a player offers an Xtream Codes option today, it means that format, not any connection to the original company.

One login for everything.

Xtream Codes and M3U access with a full 7-day guide, from $29 USD. Published 7-day refund window, no contract.

About the author

Henry Hopkins writes about IPTV, streaming technology and cord-cutting for IPTV Americans. Every post is reviewed by the Streaming Engineering Review Board before publication. Read our methodology.