What Is Xtream Codes API? Portal URL Explained (2026)

Xtream Codes API is a login-based way to deliver IPTV: instead of a single playlist link, you enter a server URL, a username and a password, and the app pulls your channels, films, series and programme guide as organised, auto-updating lists. It is the most common alternative to a plain M3U playlist, and it is what most modern IPTV players mean by “Login with Xtream Codes.” This guide explains how it works, how it differs from M3U and portal URLs, and how to use it safely.

An IPTV player login screen with fields for server URL, username and password using Xtream Codes API
Xtream Codes API loads your whole service from three fields: URL, username and password.

What Xtream Codes API Is

Xtream Codes API began as panel software that IPTV providers used to manage subscriptions. Its API — the way apps talk to that server — became a de facto standard, so today “Xtream Codes API” mostly means the login method your player uses, even when the provider runs different software behind the scenes.

The defining feature is that you authenticate with three pieces of information:

  • Server URL — the address of the provider’s server, e.g. http://example.com:8080.
  • Username — your account name.
  • Password — your account key.

From those, the app requests everything else. You never paste a giant channel list; the server hands your player structured data on demand.

How It Works

When you log in, your IPTV player calls the server’s API and receives your service split into clean sections:

  1. Authentication. The app sends your username and password to the server URL and gets back your account details (status, expiry, allowed connections).
  2. Content categories. The server returns live TV, VOD (films) and series as separate, categorised lists — not one flat file.
  3. Streams on demand. When you open a channel, the app requests just that stream, so loading is quick.
  4. EPG. The programme guide is delivered through the same API, so the EPG lines up with your channels without a separate URL.

Because the lists live on the server, the provider can add or remove channels and your app reflects it on the next refresh — no re-importing.

Diagram showing an IPTV app sending Xtream URL, username and password to a server and receiving live TV, VOD, series and EPG
One login returns four organised sections: live TV, VOD, series and EPG.

Xtream API vs M3U vs Portal URL

These three terms overlap and are often confused. Here is how they compare:

M3U playlist Xtream Codes API Portal URL (MAG-style)
You enter One playlist URL or file Server URL + username + password Portal URL (tied to device MAC)
Content structure One flat list Categorised Live / VOD / Series Provider-defined portal layout
EPG Separate EPG URL Built into the API Built into the portal
Updates Re-import to refresh Automatic Automatic
Typical devices Almost any player TiviMate, IPTV Smarters, etc. MAG boxes / STB emulators

In short: M3U is the simplest and most universal, Xtream Codes API is the most organised for apps, and a portal URL is the set-top-box style tied to your device’s MAC address. Many providers offer all three from the same account.

Good to know: most Xtream servers can also output an M3U link by adding a get.php path — e.g. http://server:port/get.php?username=USER&password=PASS&type=m3u_plus — so a player that only accepts M3U can still load the same channels.

How to Log In

Logging in with Xtream Codes takes under a minute in most players:

  1. Pick a compatible player such as TiviMate or IPTV Smarters — see our best IPTV players guide.
  2. Choose “Login with Xtream Codes” (sometimes “Xtream Codes API” or “Add Playlist → Xtream”).
  3. Enter your three fields — server URL, username, password — exactly as your provider gave them, including the port number.
  4. Wait for the load. The app pulls live TV, VOD, series and EPG automatically.
  5. Organise. Hide unused categories and reorder favourites; most players remember this per profile.

For a full app walkthrough, follow our TiviMate setup guide.

The Xtream Codes API protocol is legal — it is a delivery method, exactly like M3U. What matters is the provider behind the credentials.

  • Legal: credentials from a service that holds the rights to the channels it streams.
  • Not legal: cheap “all channels” logins sold without any rights, regardless of how polished the app looks.

Warning: a slick Xtream login does not make a service legitimate. The same red flags apply as with any IPTV — every premium channel for a few euros, payment by gift card or crypto, and no real company. WatchlyGuide only covers licensed sources.

The Bottom Line

Xtream Codes API is simply a tidier way to log in to IPTV: three fields — server URL, username and password — that load your live TV, films, series and guide as organised, self-updating sections. It is more structured than a flat M3U and different from a MAG portal URL, though many accounts support all three. Use a compatible player, enter your details exactly, and only ever with a provider that holds the proper rights.

Next, compare it with the M3U playlist format, or start from the basics with what IPTV is and how streaming actually works.

Not sure about a term on this page? Look it up in the streaming glossary.

Frequently Asked Questions

What is Xtream Codes API?

Xtream Codes API is a login-based system for delivering IPTV. Instead of a single playlist link, you enter a server URL, a username and a password. The app then queries the server and loads your live channels, films, series and programme guide as organised, categorised lists that update automatically.

What is the difference between Xtream API and M3U?

An M3U playlist is one flat link containing every channel, while Xtream Codes API uses three fields — server URL, username and password — to pull channels, VOD, series and EPG as separate, categorised sections. Xtream is more organised and updates automatically; M3U is simpler but a single long list.

What is a portal URL?

A portal URL is the server address your IPTV app connects to, usually in the form http://server:port. With Xtream Codes API you pair it with a username and password; with some set-top-box apps (MAG-style) the portal URL alone loads the service, tied to your device's MAC address.

How do I log in with Xtream Codes API?

Open an IPTV player that supports Xtream Codes login, such as TiviMate or IPTV Smarters, choose the Xtream Codes or 'Login with Xtream' option, then enter the server URL, username and password from your provider. The app connects and loads your live TV, VOD, series and EPG automatically.

Is Xtream Codes API legal?

The Xtream Codes API technology and protocol are legal — it is just a delivery method, like M3U. Legality depends entirely on the provider behind the credentials. Licensed services that use it are fine; credentials sold cheaply for premium channels without rights are not. Use licensed providers only.

Can I convert Xtream Codes API to M3U?

Yes. Most Xtream servers expose an M3U output by appending a get.php path to the server URL with your username and password, for example http://server:port/get.php?username=USER&password=PASS&type=m3u_plus. This lets players that only accept M3U load the same channels the Xtream login provides.