Introduction Last updated: 2022-07-21

This Documentaion will help you intergrate IPTV API in your any kind of web or mobile application.
You allways need to use the api key special-key to pass authorization.

Secutiy Alert:

Don't use or add your api key directly in your android or any other app source code, hackers can capture it through using diffrent packet capture tools you need install your web server and put your api key there, connect your app with your web server then send calls with parameters to endpoint.


To use this documentation your need special-api-key that you can take from here.
visit https://FindFromYourPanel.TLD

Endpoints

The API is accessed by making HTTPS requests to a specific version endpoint URL, in which GET, POST methods dictate how your interact with the information available. Every endpoint is accessed only via the SSL-enabled HTTPS (port 443) protocol, Everything (methods, parameters, etc.) is fixed to a version number, and every call must contain one. The latest version is Version 3.

The stable base URL for all Version 3 HTTPS endpoints is: https://iptv-api.xtream-masters.com/v3/

Get API Status

How to get API status or subscribe plan details.

You need send call to endpoint with below mention parameters.

API CALL

curl -X POST "https://iptv-api.xtream-masters.com/v3/"
-d 'apikey=special-key&type=infoapi'


curl -X GET "https://iptv-api.xtream-masters.com/v3/?apikey=special-key&type=infoapi"


Credit Plan API Response: OK
{
  "allow_trial": "50",
  "used_trial": "7",
  "user_credit": "1088.73",
  "api_username": "something",
  "is_monthly": "0",
  "monthly_max_lines": "0",
  "api_status": "1",
  "whatsapp_otp": "123456",
  "whatsapp_bot": "92xxxxxxxxxx",
  "next_renewal": "0",
  "total_paid_lines": "123"
}

Monthly Plan API Response: OK
{
  "allow_trial": "50",
  "used_trial": "7",
  "user_credit": "1088.73",
  "api_username": "something",
  "is_monthly": "1",
  "monthly_max_lines": "500",
  "api_status": "1",
  "whatsapp_otp": "123456",
  "whatsapp_bot": "92xxxxxxxxxx",
  "next_renewal": "2022-07-25",
  "total_paid_lines": "123"
}

Get API Credits History

How to get API Credits History.

You need send call to endpoint with below mention parameters.

API CALL

curl -X POST "https://iptv-api.xtream-masters.com/v3/"
-d 'apikey=special-key&type=credit_logs'


curl -X GET "https://iptv-api.xtream-masters.com/v3/?apikey=special-key&type=credit_logs"


API Response: OK
[
  //.............
  {
    "log_id": "77270",
    "api_username": "something",
    "info": "IPTV Line Delete - random_username",
    "date": "19-07-2022",
    "credits_charge": "+5",
    "credits_left": "53.37"
  },
  {
    "log_id": "77267",
    "api_username": "something",
    "info": "New IPTV Line Purchase - random_username",
    "date": "19-07-2022",
    "credits_charge": "-5",
    "credits_left": "48.37"
  },
  //.............
]

Note

Response can empty as well if API don't do any activity with some purchase.

Xtream User APIs

This section will example how to generate, edit, extend or delete xtream users by calling to api endpoint.

Playlist access links examples

Xtream user can use in many devices which is support streaming protocol, below is list of all devices name and available formats.


See Player API Documentaion

How to generate new xtream user.

You need send call to endpoint with below mention parameters.

The example for generate one day test xtream user.
API CALL

curl -X POST "https://iptv-api.xtream-masters.com/v3/"
-d 'apikey=special-key&user=random_username&pass=random_password&conx=1&bid=[5,11]&plan=11&addch=1&addvods=1&adults=&notice=your+custom+notice&ch=&type=add'


curl -X GET "https://iptv-api.xtream-masters.com/v3/?apikey=special-key&user=random_username&pass=random_password&conx=1&bid=[5,11]&plan=11&addch=1&addvods=1&adults=&notice=your+custom+notice&ch=&type=add"


API Response: OK
{
   "status":"success",
   "msg":"Success: You have successfully generate iptv trial line."
}
API Response: NOK
{
   "status":"error",
   "msg":"Error: message response depends on data submission."
}

Edit xtream user

There you will know how to edit xtream user.

You need send call to endpoint with below mention parameters.

The example for edit already existing xtream user under your api.
API CALL

curl -X POST "https://iptv-api.xtream-masters.com/v3/"
-d 'apikey=special-key&user=existing_username&newuser=new_random_username&pass=random_password¬ice=your+custom+notice&ch=&type=edit'


curl -X GET 'https://iptv-api.xtream-masters.com/v3/?apikey=special-key&user=existing_username&newuser=new_random_username&pass=random_password¬ice=your+custom+notice&ch=&type=edit'


API Response: OK
{
   "status":"success",
   "msg":"Success: You\'ve successfully modified your line."
}
API Response: NOK
{
   "status":"error",
   "msg":"Error: message response depends on data submission."
}

Extend Xtream User

How to extend Xtream user.

You need send call to endpoint with below mention parameters.

Explain of parameters:
user the xtream user, username that want extend.
type type is statics: extend for extend existing xtream user.
plan parameters explain, credits cost for asian or full package.
plan Type Details Asian Credits World Credits
1 Paid 1 Month subscription 1 1
2 Paid 3 Month subscription 3 3
3 Paid 6 Month subscription 5 5
4 Paid 12 Month subscription 10 10
The example for extend existing xtream user for 12/months that under your api.
API CALL

curl -X POST "https://iptv-api.xtream-masters.com/v3/"
-d 'apikey=special-key&user=existing_username&plan=4&type=extend'


curl -X GET 'https://iptv-api.xtream-masters.com/v3/?apikey=special-key&user=existing_username&plan=4&type=extend'


API Response: OK
{
   "status":"success",
   "msg":"Success: You\'ve successfully extend your line."
}
API Response: NOK
{
   "status":"error",
   "msg":"Error: message response depends on data submission."
}

Delete Xtream User

How to delete existing xtream user.

You need send call to endpoint with below mention parameters.

The example delete existing xtream user.
API CALL

curl -X POST "https://iptv-api.xtream-masters.com/v3/"
-d 'apikey=special-key&user=existing_username&type=del'


curl -X GET 'https://iptv-api.xtream-masters.com/v3/?apikey=special-key&user=existing_username&type=del'


API Response: OK
{
   "status":"success",
   "msg":"Success: Your subscription has been deleted / rest credits refunded."
}
API Response: NOK
{
   "status":"error",
   "msg":"Error: message response depends on data submission."
}

ActiveCode APIs

This section will example how to generate, edit, extend or delete ActiveCode users by calling to api endpoint.

Generate ActiveCode User

ActiveCode user can use in spacific APK or ISO Player.

How to generate new ActiveCode user.

You need send call to endpoint with below mention parameters.

Explain of parameters:
info password should be static in your player app, value: TVSTARIPTV
user only digits allowed, should be upto 12 or max: 18 digits
conx this is multi-screen feature = max value is : 4 (CONX x Credits)
callback callback explained here.
type type is statics: activecode for generate new ActiveCode user.
plan parameters explain, credits cost for asian or full package.
plan Type Details World Credits Asian Credits
11 Free 24 hour test 0 0
1 Paid 1 Month subscription 1 1
2 Paid 3 Month subscription 3 3
3 Paid 6 Month subscription 5 5
4 Paid 12 Month subscription 10 10
bid Package parameters explain.
bid details
[5,11] Full worldwide subscription, Channels + Movies + Series (No Adult)
[4,7] Full worldwide subscription, Channels + Movies + Series (With Adult)
[1232,1234] Mini Asian Package - Family, For Asian countries content only
[1233,1235] Mini Asian Package - Include Adult, For Asian countries content only
Custom content managing parameters:
Info value should be empty or 1
addch for add channels in subscription set value: 1 Recommended
addvods for add movies/series in subscription set value: 1 or leave empty for don't
adults for add adult content in subscription set value: 1 or leave empty for don't

Callback

1- Your server callback link (should be encoded in base64 basic encryption) where system will send notification about activecode Activation when user run code in player, example of call back url https://yourserverdomain.tld/ApiLocation/

base64 encoded example callback: aHR0cHM6Ly95b3Vyc2VydmVyZG9tYWluLnRsZC9BcGlMb2NhdGlvbi8

2- Now In your Server ApiLocation there should be file, named: callback_activecode.php where system will send following data.

--REQUEST '{"action":"active", "activecode":"01234567891011", "start":"1658762715", "end":"1669772715"}'

3- Start and expiry date in timestamp format.

example callback_activecode.php code.
if (isset($_REQUEST['handshake'])) { die('1'); }
if ((isset($_REQUEST['action'])) && (isset($_REQUEST['activecode'])) && (isset($_REQUEST['start'])) && (isset($_REQUEST['start']))) {
if (strlen($_REQUEST['end']) > 11) { die(); } if (strlen($_REQUEST['start']) > 11) { die(); } if (strlen($_REQUEST['end']) < 11) { die(); } if (strlen($_REQUEST['start']) < 11) { die(); }

if ($_REQUEST['action'] == 'active')
{
    if (is_numeric($_REQUEST['activecode']))
    {
        if (is_numeric($_REQUEST['start']))
        {
            if (is_numeric($_REQUEST['end']))
            {
			
                $code = $_REQUEST['activecode'];
                $start = $_REQUEST['start'];
                $end = $_REQUEST['end'];

                //do work here.
               
            }
        }
    }
}
}
The example for generate one day test ActiveCode user.
API CALL

curl -X POST "https://iptv-api.xtream-masters.com/v3/"
-d 'apikey=special-key&bid=[5,11]&conx=1&plan=11&addch=1&addvods=1&adults=&notice=your+custom+notice&callback=aHR0cHM6Ly95b3Vyc2VydmVyZG9tYWluLnRsZC9BcGlMb2NhdGlvbi8&ch=&type=activecode'


curl -X GET 'https://iptv-api.xtream-masters.com/v3/?apikey=special-key&bid=[5,11]&conx=1&plan=11&addch=1&addvods=1&adults=&notice=your+custom+notice&callback=aHR0cHM6Ly95b3Vyc2VydmVyZG9tYWluLnRsZC9BcGlMb2NhdGlvbi8&ch=&type=activecode'


API Response: OK
{
   "status":"success",
   "msg":"Success: You have successfully generate activecode trial line."
}
API Response: NOK
{
   "status":"error",
   "msg":"Error: message response depends on data submission."
}

Extend ActiveCode

How to extend ActiveCode user.

You need send call to endpoint with below mention parameters.

Explain of parameters:
user the ActiveCode that want to extend.
type type is statics: extendac for extend activecode.
plan parameters explain, credits cost for asian or full package.
plan Type Details Asian Credits World Credits
1 Paid 1 Month subscription 1 1
2 Paid 3 Month subscription 3 3
3 Paid 6 Month subscription 5 5
4 Paid 12 Month subscription 10 10
The example for extend existing ActiveCode for 12/months that under your api.
API CALL

curl -X POST "https://iptv-api.xtream-masters.com/v3/"
-d 'apikey=special-key&user=01234567891011&plan=4&type=extendac'


curl -X GET 'https://iptv-api.xtream-masters.com/v3/?apikey=special-key&user=01234567891011&plan=4&type=extendac'


API Response: OK
{
   "status":"success",
   "msg":"Success: You\'ve successfully extend your activecode."
}
API Response: NOK
{
   "status":"error",
   "msg":"Error: message response depends on data submission."
}

Delete ActiveCode User

How to delete existing ActiveCode user.

You need send call to endpoint with below mention parameters.

The example delete existing activecode user.
API CALL

curl -X POST "https://iptv-api.xtream-masters.com/v3/"
-d 'apikey=special-key&user=01234567891011&type=delac'


curl -X GET 'https://iptv-api.xtream-masters.com/v3/?apikey=special-key&user=01234567891011&type=delac'


API Response: OK
{
   "status":"success",
   "msg":"Success: Your ActiveCode has been deleted."
}
API Response: NOK
{
   "status":"error",
   "msg":"Error: message response depends on data submission."
}

Mac Address APIs

This section will example how to register, edit, extend or delete Mac address users by calling to api endpoint.

Register Mac Address APIs

Mac Address can register for all kind of devices where custom portal address insert option available so you can first register device mac address and insert there portal address to load playlist.

How to generate new ActiveCode user.

You need send call to endpoint with below mention parameters.

Explain of parameters:
mac this option with statics value: 1
address for mac address that want to register, example. 00:AA:BB:CC:DD:11
type type is statics: addmac for register new mac address user.
plan parameters explain, credits cost for asian or full package.
plan Type Details World Credits Asian Credits
11 Free 24 hour test 0 0
1 Paid 1 Month subscription 1 1
2 Paid 3 Month subscription 3 3
3 Paid 6 Month subscription 5 5
4 Paid 12 Month subscription 10 10
bid Package parameters explain.
bid details
[5,11] Full worldwide subscription, Channels + Movies + Series (No Adult)
[4,7] Full worldwide subscription, Channels + Movies + Series (With Adult)
[1232,1234] Mini Asian Package - Family, For Asian countries content only
[1233,1235] Mini Asian Package - Include Adult, For Asian countries content only
Custom content managing parameters:
Info value should be empty or 1
addch for add channels in subscription set value: 1 Recommended
addvods for add movies/series in subscription set value: 1 or leave empty for don't
adults for add adult content in subscription set value: 1 or leave empty for don't
The example for register one-day test mac address user.
API CALL

curl -X POST "https://iptv-api.xtream-masters.com/v3/"
-d 'apikey=special-key&address=00:AA:BB:CC:DD:11&bid=[5,11]&mac=1&plan=11&addch=1&addvods=1&adults=&notice=your+custom+notice&ch=&type=addmac'


curl -X GET 'https://iptv-api.xtream-masters.com/v3/?apikey=special-key&address=00:AA:BB:CC:DD:11&bid=[5,11]&mac=1&plan=11&addch=1&addvods=1&adults=&notice=your+custom+notice&ch=&type=addmac'


API Response: OK
{
   "status":"success",
   "msg":"Success: You have successfully register mac address trial."
}
API Response: NOK
{
   "status":"error",
   "msg":"Error: message repsonse depends on submitted data submission."
}

Edit mac address user

There you will know how to edit/change registered mac address user.

You need send call to endpoint with below mention parameters.

The example for edit already existing xtream user under your api.
API CALL

curl -X POST "https://iptv-api.xtream-masters.com/v3/"
-d 'apikey=special-key&user=00:AA:BB:CC:DD:11&newuser=00:AA:BB:CC:DD:22&ch=&type=editmac'


curl -X GET 'https://iptv-api.xtream-masters.com/v3/?apikey=special-key&user=00:AA:BB:CC:DD:11&newuser=00:AA:BB:CC:DD:22&ch=&type=editmac'


API Response: OK
{
   "status":"success",
   "msg":"Success: You\'ve successfully modified your mac address."
}
API Response: NOK
{
   "status":"error",
   "msg":"Error: message repsonse depends on submitted data submission."
}

Extend Mac Address

How to extend Mac Address user.

You need send call to endpoint with below mention parameters.

Explain of parameters:
user set your existing mac address that you want extend.
type type is statics: extendmac for extend mac address.
plan parameters explain, credits cost for asian or full package.
plan Type Details Asian Credits World Credits
1 Paid 1 Month subscription 1 1
2 Paid 3 Month subscription 3 3
3 Paid 6 Month subscription 5 5
4 Paid 12 Month subscription 10 10
The example for extend existing ActiveCode for 12/months that under your api.
API CALL

curl -X POST "https://iptv-api.xtream-masters.com/v3/"
-d 'apikey=special-key&user=00:AA:BB:CC:DD:11&plan=4&type=extendmac'


curl -X GET 'https://iptv-api.xtream-masters.com/v3/?apikey=special-key&user=00:AA:BB:CC:DD:11&plan=4&type=extendmac'


API Response: OK
{
   "status":"success",
   "msg":"Success: You\'ve successfully extend your mac address."
}
API Response: NOK
{
   "status":"error",
   "msg":"Error: message repsonse depends on submitted data submission."
}

Delete Mac Address User

How to delete existing mac address user.

You need send call to endpoint with below mention parameters.

The example delete existing mac address user.
API CALL

curl -X POST "https://iptv-api.xtream-masters.com/v3/"
-d 'apikey=special-key&user=00:AA:BB:CC:DD:11&type=delmac'


curl -X GET 'https://iptv-api.xtream-masters.com/v3/?apikey=special-key&user=00:AA:BB:CC:DD:11&type=delmac'


API Response: OK
{
   "status":"success",
   "msg":"Success: Your mac address has been deleted."
}
API Response: NOK
{
   "status":"error",
   "msg":"Error: message repsonse depends on submitted data submission."
}