SG
StreamGrid
  • Home
  • Providers
  • Best IPTV
  • FAQ

Best IPTV

  • Best IPTV Services 2025
  • Best IPTV UK
  • Best IPTV USA
  • Best IPTV France
  • Best IPTV Germany
  • Best IPTV for Sports

Popular Providers

  • Xtreme HD IPTV
  • IPTV Trends
  • Beast TV
  • Helix IPTV
  • Sportz TV
  • View All Providers

Setup Guides

  • Firestick Setup
  • Android TV Setup
  • Smart TV Setup
  • TiviMate Guide
  • IPTV Smarters Guide
  • All Setup Guides

IPTV Guides

  • What is IPTV?
  • Is IPTV Legal?
  • Fix IPTV Buffering
  • VPN for IPTV
  • IPTV Not Working
  • All Guides

Countries

  • United Kingdom
  • United States
  • France
  • Germany
  • Spain
  • Netherlands
  • Belgium
  • Brazil
  • Turkey
  • Saudi Arabia
  • Austria
  • UAE

Categories

  • Sports IPTV
  • Movies & TV Shows
  • Kids IPTV
  • All Categories

Resources

  • FAQ
  • Support
  • Compare Providers

Legal

  • Disclaimer
  • DMCA Policy
SG

StreamGrid

Your trusted IPTV resource

© 2025 StreamGrid. All rights reserved. |Legal Disclaimer: This website is for educational and informational purposes only. We do not host, operate, sell, or distribute any IPTV services or streaming content. All trademarks and copyrights belong to their respective owners.Read full disclaimer |DMCA Policy

Xtream Codes API Complete Guide 2025

Everything you need to know about Xtream Codes API protocol, setup, configuration, and troubleshooting for IPTV services

Xtream Codes API is the industry-standard protocol for IPTV service delivery, used by thousands of providers worldwide. This comprehensive guide covers everything from basic setup to advanced API usage, helping both users and developers understand how to work with Xtream Codes effectively. Whether you're setting up your first IPTV subscription or building custom applications, this guide provides the knowledge you need.

What is Xtream Codes API?

Xtream Codes API is a standardized protocol that allows IPTV applications to communicate with IPTV servers. Originally developed by Xtream Codes before its shutdown in 2019, the API protocol has become the de facto standard for IPTV services. Most modern IPTV providers continue to use Xtream Codes API format because of its widespread compatibility and robust feature set.

Key Features of Xtream Codes API

  • ✓Live TV channel streaming
  • ✓Video on Demand (VOD) libraries
  • ✓TV series with episode management
  • ✓Electronic Program Guide (EPG)
  • ✓Catch-up TV functionality
  • ✓Multi-device support
  • ✓User authentication and management
  • ✓Parental controls

Xtream Codes Credentials Explained

To connect to an IPTV service using Xtream Codes API, you need three essential pieces of information provided by your IPTV provider:

Server URL

The server URL is the address of your IPTV provider's server. It typically looks like http://example.com:8080 or http://123.456.789.012:8080. This is where your IPTV app will connect to retrieve channel lists and stream content.

Example: http://iptv-server.com:8080

Username

Your unique username identifies your subscription on the IPTV server. This is usually a random string of letters and numbers provided by your IPTV provider. Never share your username with others as it's tied to your subscription.

Example: user12345abc

Password

The password authenticates your account and should be kept secure. Like the username, it's typically a random string provided by your IPTV provider. Some providers allow you to change your password through their customer portal.

Example: pass67890xyz

âš Security Warning

Never share your Xtream Codes credentials with anyone. Your provider can track which devices and IP addresses use your account. Sharing credentials may result in account suspension and violates most providers' terms of service.

How to Set Up Xtream Codes in IPTV Apps

TiviMate Setup

  1. 1.

    Open TiviMate and Add Playlist

    Launch TiviMate, go to Settings → Playlists → Add Playlist

  2. 2.

    Select Xtream Codes API

    Choose "Xtream Codes API" as the playlist type

  3. 3.

    Enter Your Credentials

    Fill in the following fields:

    Name: My IPTV Service
    Server URL: http://your-server.com:8080
    Username: your_username
    Password: your_password
  4. 4.

    Save and Load Channels

    Click "Next" and TiviMate will automatically load your channel list, VOD, and series

IPTV Smarters Pro Setup

  1. 1.

    Launch IPTV Smarters Pro

    Open the app and select "Login with Xtream Codes API"

  2. 2.

    Enter Server Information

    Input your credentials:

    Server URL: http://your-server.com:8080
    Username: your_username
    Password: your_password
  3. 3.

    Add User

    Click "Add User" and the app will verify your credentials and load content

  4. 4.

    Access Your Content

    Navigate between Live TV, Movies, and Series tabs to access your content

Perfect Player Setup

  1. 1.

    Open Settings

    Launch Perfect Player, press the gear icon or back button to access settings

  2. 2.

    Add Playlist

    Go to "General" → "Playlists" → Click "+" to add new playlist

  3. 3.

    Configure Xtream Codes

    Enter your details:

    Name: My IPTV
    Playlist type: Xtream Codes
    Server: http://your-server.com:8080
    Username: your_username
    Password: your_password
  4. 4.

    Save and Restart

    Save settings and restart Perfect Player to load your channels

Xtream Codes API Endpoints

For developers and advanced users, understanding Xtream Codes API endpoints is essential. Here are the main API calls used by IPTV applications:

Authentication & User Info

http://server:port/player_api.php?username=USERNAME&password=PASSWORD

Returns user information, subscription status, expiration date, allowed connections, and server information. This is typically the first API call made to verify credentials.

Get Live Streams

http://server:port/player_api.php?username=USERNAME&password=PASSWORD&action=get_live_streams

Returns complete list of available live TV channels with stream IDs, names, categories, and metadata. Apps use this to build the channel list.

Get VOD Streams

http://server:port/player_api.php?username=USERNAME&password=PASSWORD&action=get_vod_streams

Returns list of Video on Demand content including movies with titles, descriptions, ratings, and cover images.

Get Series

http://server:port/player_api.php?username=USERNAME&password=PASSWORD&action=get_series

Returns list of TV series with season and episode information, allowing apps to organize content by show.

Get Live Categories

http://server:port/player_api.php?username=USERNAME&password=PASSWORD&action=get_live_categories

Returns category list for organizing live channels (Sports, Movies, News, etc.).

Get EPG

http://server:port/player_api.php?username=USERNAME&password=PASSWORD&action=get_simple_data_table&stream_id=STREAM_ID

Returns Electronic Program Guide data for a specific channel, showing current and upcoming programs.

Stream URL Format

http://server:port/live/USERNAME/PASSWORD/STREAM_ID.ts

The actual streaming URL format for playing live channels. Replace STREAM_ID with the channel's stream ID from the get_live_streams response.

Xtream Codes vs M3U Playlist

FeatureXtream Codes APIM3U Playlist
Setup ComplexityEasy - Just 3 credentialsMedium - Need full URL
Channel UpdatesAutomatic - Real-time syncManual - Must reload playlist
EPG SupportBuilt-in - Integrated EPGSeparate - Requires EPG URL
VOD & SeriesFull Support - Organized by categoryLimited - Basic VOD only
Catch-up TVSupported - If provider enablesNot Available
App CompatibilityExcellent - Most modern appsUniversal - All IPTV apps
SecurityBetter - Credentials onlyLower - Full URLs exposed

Recommendation

Use Xtream Codes API whenever your provider supports it. It offers better functionality, automatic updates, and improved security compared to M3U playlists. Only use M3U if your provider doesn't offer Xtream Codes or if you're using an older app that doesn't support the API.

Common Xtream Codes Errors & Solutions

Error: "Cannot Connect to Server"

This error indicates the app cannot reach your IPTV server. Common causes include incorrect server URL, network issues, or server downtime.

Solutions:

  • →Verify server URL is correct (check for typos, http vs https, port number)
  • →Check your internet connection
  • →Try accessing the server URL in a web browser
  • →Contact your provider to verify server status
  • →Disable VPN temporarily to test connection

Error: "Invalid Username or Password"

Authentication failed because the credentials are incorrect or the account is inactive.

Solutions:

  • →Double-check username and password for typos
  • →Ensure no extra spaces before or after credentials
  • →Verify your subscription is active and not expired
  • →Contact provider to reset password if needed
  • →Check if account was suspended for policy violations

Error: "Maximum Connections Reached"

Your account is being used on more devices than allowed by your subscription plan.

Solutions:

  • →Close IPTV apps on other devices
  • →Wait 5-10 minutes for connections to timeout
  • →Check how many simultaneous connections your plan allows
  • →Upgrade to a plan with more connections if needed
  • →Change password if you suspect unauthorized access

Error: "Playlist is Empty"

The API returned successfully but no channels were loaded. This usually indicates a server-side issue.

Solutions:

  • →Wait a few minutes and try reloading the playlist
  • →Clear app cache and data, then reconfigure
  • →Contact provider - they may be updating their channel list
  • →Try a different IPTV app to rule out app-specific issues

Error: "Account Expired"

Your subscription has reached its expiration date and needs to be renewed.

Solutions:

  • →Contact your provider to renew subscription
  • →Check provider's website for renewal options
  • →Verify payment was processed if you have auto-renewal
  • →Ask about grace periods or trial extensions

Advanced Xtream Codes Features

Catch-up TV

Xtream Codes supports catch-up TV, allowing you to watch programs that aired in the past few days. If your provider enables this feature, you can access it through compatible apps.

How to use:

  • • Open EPG for a channel
  • • Select a past program
  • • Click to play from the beginning
  • • Availability varies by provider (typically 1-7 days)

Multi-Quality Streams

Some providers offer multiple quality options for the same channel through Xtream Codes API. This allows you to choose between HD, SD, and low-quality streams based on your internet speed.

Quality options:

  • • HD (1080p) - Requires 10+ Mbps
  • • SD (720p/480p) - Requires 5+ Mbps
  • • Low (360p) - Requires 2+ Mbps
  • • Auto - App selects based on connection

Parental Controls

Xtream Codes API includes parental control information that apps can use to restrict access to adult content. Categories marked as adult require PIN entry in compatible apps.

Features:

  • • Adult content flagging
  • • PIN protection in apps
  • • Category-based filtering
  • • Kids mode in supported apps

Series Management

Unlike M3U playlists, Xtream Codes properly organizes TV series by show, season, and episode. This makes it easy to binge-watch series and track your progress.

Organization:

  • • Shows grouped by title
  • • Seasons organized numerically
  • • Episodes with descriptions
  • • Continue watching tracking

Best Practices for Xtream Codes

Keep Credentials Secure

Never share your Xtream Codes credentials with anyone. Store them securely and change your password regularly if your provider allows it. Use different passwords for different services to minimize risk if one account is compromised.

Use Reliable Apps

Stick to well-known IPTV apps like TiviMate, IPTV Smarters Pro, or Perfect Player. These apps properly implement Xtream Codes API and receive regular updates. Avoid unknown apps that might mishandle your credentials or contain malware.

Monitor Connection Usage

Keep track of which devices are using your IPTV subscription. Most providers show active connections in their customer portal. If you see unexpected connections, change your password immediately and contact your provider.

Update Apps Regularly

Keep your IPTV apps updated to the latest versions. Updates often include improvements to Xtream Codes API handling, bug fixes, and new features. Enable automatic updates when possible to ensure you always have the latest version.

Test Before Committing

When trying a new IPTV provider, start with a short subscription (24 hours or 1 week) to test their Xtream Codes implementation. Verify that channels load quickly, EPG works correctly, and VOD/series are properly organized before purchasing longer subscriptions.

Backup Your Configuration

Save your Xtream Codes credentials in a secure location (password manager or encrypted note). This makes it easy to reconfigure if you switch devices or need to reinstall apps. Some apps also offer backup/restore features for your settings.

Frequently Asked Questions

What is Xtream Codes API?â–¼

Xtream Codes API is a standardized protocol for IPTV service delivery that allows apps to communicate with IPTV servers. It provides access to live TV, VOD, series, EPG, and other features through a set of API endpoints. Most modern IPTV providers use this protocol.

Is Xtream Codes still working after the shutdown?â–¼

Yes, the Xtream Codes API protocol continues to work even after the original company shut down in 2019. The API format has become an industry standard, and most IPTV providers continue to use Xtream Codes-compatible servers.

How do I get Xtream Codes credentials?â–¼

Your IPTV provider will give you Xtream Codes credentials (server URL, username, password) when you purchase a subscription. These are typically sent via email or available in your customer portal. Never share these credentials with others.

Can I use Xtream Codes on multiple devices?â–¼

Yes, but the number of simultaneous connections depends on your subscription plan. Most providers offer 1-5 connections. You can install the same credentials on multiple devices, but only the allowed number can stream at once.

Which apps support Xtream Codes API?â–¼

Most modern IPTV apps support Xtream Codes including TiviMate, IPTV Smarters Pro, Perfect Player, GSE Smart IPTV, OTT Navigator, and many others. Check your app's documentation to confirm Xtream Codes support.

What's the difference between Xtream Codes and M3U?â–¼

Xtream Codes is an API protocol that provides dynamic content updates, EPG integration, VOD organization, and catch-up TV. M3U is a static playlist file that requires manual updates and has limited features. Xtream Codes is generally superior when available.

Why can't I connect to my Xtream Codes server?â–¼

Connection issues are usually caused by incorrect server URL, wrong credentials, network problems, or server downtime. Verify your credentials are correct, check your internet connection, and contact your provider if the problem persists.

How do I update my Xtream Codes playlist?â–¼

Xtream Codes playlists update automatically when you restart your IPTV app or manually refresh. Unlike M3U playlists, you don't need to download new files - the API always provides the latest channel list from your provider.

Can I convert Xtream Codes to M3U?â–¼

Yes, you can generate an M3U playlist from Xtream Codes credentials using the URL format: http://server:port/get.php?username=USERNAME&password=PASSWORD&type=m3u_plus&output=ts. However, you'll lose many Xtream Codes features.

Is Xtream Codes secure?â–¼

Xtream Codes itself is reasonably secure as it uses username/password authentication. However, security depends on your provider's implementation and whether they use HTTPS. Always use strong passwords and don't share credentials.

What does 'Maximum connections reached' mean?â–¼

This error means your account is being used on more devices than your subscription allows. Close IPTV apps on other devices, wait for connections to timeout (5-10 minutes), or upgrade to a plan with more simultaneous connections.

How do I find my Xtream Codes server URL?â–¼

Your provider should give you the server URL when you subscribe. It typically looks like http://example.com:8080 or http://123.456.789.012:8080. Check your welcome email or customer portal, or contact provider support.

Can I use Xtream Codes with VPN?â–¼

Yes, Xtream Codes works with VPN. In fact, using a VPN is recommended for IPTV to protect privacy and prevent ISP throttling. Just ensure your VPN doesn't significantly slow your connection, which could cause buffering.

What is catch-up TV in Xtream Codes?â–¼

Catch-up TV allows you to watch programs that aired in the past few days. If your provider enables this feature, you can access it through the EPG by selecting past programs. Availability typically ranges from 1-7 days depending on the provider.

How do I set up parental controls with Xtream Codes?â–¼

Parental controls are configured in your IPTV app, not in Xtream Codes itself. Most apps that support Xtream Codes offer PIN protection, content filtering, and kids modes. Enable these features in your app's settings.

Why is my Xtream Codes playlist empty?â–¼

An empty playlist usually indicates a server-side issue. Wait a few minutes and try reloading, clear your app cache, or contact your provider. They may be updating their channel list or experiencing technical difficulties.

Can I share my Xtream Codes credentials?â–¼

No, sharing credentials violates most providers' terms of service and can result in account suspension. Providers can track which devices and IP addresses use your account. Each user should have their own subscription.

What internet speed do I need for Xtream Codes?â–¼

For SD streaming, you need at least 5 Mbps. For HD streaming, aim for 10-15 Mbps per device. If multiple devices will stream simultaneously, multiply these requirements. A 50 Mbps connection comfortably supports 3-4 HD streams.

How do I troubleshoot Xtream Codes authentication errors?â–¼

Double-check your credentials for typos, ensure no extra spaces, verify your subscription is active, and confirm the server URL is correct. If everything looks right, contact your provider to verify your account status.

Can I use Xtream Codes on Smart TV?â–¼

Yes, if your Smart TV supports IPTV apps that work with Xtream Codes. Samsung Tizen and LG webOS have limited app options, but Android TV and Fire TV have excellent Xtream Codes app support including TiviMate and IPTV Smarters Pro.

Conclusion

Xtream Codes API has become the gold standard for IPTV service delivery, offering superior functionality compared to traditional M3U playlists. Understanding how to properly configure and use Xtream Codes credentials ensures you get the best possible experience from your IPTV subscription.

Whether you're a casual user setting up your first IPTV service or a developer building custom applications, this guide provides the foundation you need to work effectively with Xtream Codes API. Always use reputable IPTV apps, keep your credentials secure, and follow best practices to ensure reliable streaming.

As IPTV technology continues to evolve, Xtream Codes API remains the most widely supported and feature-rich protocol for delivering live TV, VOD, and series content. By mastering Xtream Codes, you'll be well-equipped to enjoy the full capabilities of modern IPTV services.