Our Sponsor provides IPTV Trial Service.

How to use Xtream Codes API in IPTV applications?

Xtream codes API roots back to a company came online years ago with the same name destined to change the whole thing in IPTV world. They create a CMS (Content management system) the core of which still serves as a model for all the panels out there. They also created many different things alongside that including an easy method to enter long M3U streaming line into application the easiest way.

What are the use cases of Xtream Codes API login format

The function is made for streaming lines. This means that devices and applications which are not using M3U url or other form of streaming lines are not able to use Xtream Codes API method for adding a playlist. For instance, stalker portal devices like MAG can not use it.


xtream codes api page on iptv application

What does Xtream Codes API login do

Whenever you install an IPTV application, the first thing to do is to install the play list. Typing the whole url into apps is what's normal but hard and takes forever to do it. It is also a reason behind unwanted typo's and mistakes as the url is so long with lots of parameters. With this login format, you can type in the fundamental parts of the M3U url only, the repeated parts of the streaming line are already embedded inside this function.


Understanding the key parts of a streaming line

A streaming line consists of different parameters, each explaining something about the url. Proper understanding of these elements is needed when you are trying to add details in an application. An example will shed more lights on this.

Assume we have the follow M3U url from our provider:


Let's analyze the url address above:

http://anyaddress.com > this one is called server address, host, server url or server domain. They are all the same. It is the address to the main server of your provider

:89 > this is the port. Note that whenever the port is 80, you can also not include it as port 80 is the default web port. But there are many services that use ports different from 80 and it is important not to miss it. In this example, the port is 89 .

get.php? > This is the command which request for resources from the remote main server.

username= > the value in front of this parameter is your account username, in this example username is john123.

password= > the value in front of this parameter is your account password, in this example password is jack123.

type= > determines the type of the streaming line we are using. In this example, we are using an m3u_plus which is also known as M3U with Options. It contains the channel listing in categories.

output= > shows the streaming format assigned to the account. Here we are using a MPEGTS, also known as .ts which is the most common streaming format.


Now that we know all the key parts of a streaming line, let's add them in Xtream Codes API format


entering login details in xtream cods format

How to add streaming playlist in xtream codes api method

First of all, you need to make sure that this feature is coded in the login section of your application that you are using.

There are 4 parameters which are necessary:

Playlist Name > You can name your playlist anything you want.

Username > add the value after username=

Password > add the value after password=

Server:Port > the first part of your url. For instance, in the url of the example earlier, the value for this section would be http://anyaddress.com:80

You can now proceed with login step by pressing Login, Add User, Sign in, Connect or any button you are provided with to log into your account after submitting xtream codes api details. This step should not take any loner than short few seconds.


Things to pay attention to

Deceptive letters: Username and password are case sensitive in IPTV accounts. There are also some letters which have similar look when you are looking at them. For instance, Capital "i" and lowercase "L" - If you type them right beside each other, they look almost the same. The easiest method to identify these letters, is to copy and paste them in search engines, like google or duckduckgo, and hit the search button. You will then know what letter that is so you wont be miss-typing it into your application.

Neuter port 80: The default web browsing http port is 80 . Therefore, if your service is not mentioning their port number in their details, it means the port is 80 and you also do not need to include it, but you can do if you want to.

http:// vs https:// : Most providers stream their service over http:// . If you add their server address in https:// and they have not configured the SSL on their main server, even if you enter the correct login details, it may fail. So add the correct address protocol as per your service's instructions.


Final word

Xtream Codes API was first designed by a company with the same name aiming to simplify the login step for IPTV users. This method is only available in the applications which support streaming lines e.g. M3U url. Other devices and apps like MAG which are using stalker portal can not use this feature.