Getting Started

The IPTV Secure Links API provides programmatic access to all scanning, link management, and export functionality. All endpoints return JSON responses.

Authentication

Currently, the public API is open for read access. For write operations, include your API key in the header:

X-API-Key: your_api_key_here

Base URL

https://securelinks.appsgm.com/api/

Endpoints

GET /api/links

Retrieve a list of IPTV links with optional filtering.

Query Parameters

ParameterTypeDescription
statusstringFilter by status: VALID, INVALID, PENDING, ERROR
portalstringFilter by portal URL (partial match)
limitintegerResults per page (default: 20, max: 100)
offsetintegerOffset for pagination
sinceintegerUnix timestamp - only links created after this time

Example Response

{ "success": true, "total": 150, "links": [ { "id": 1, "portal_url": "http://example.com/portal", "mac": "00:1A:79:00:00:01", "status": "VALID", "exp_date": "2026-12-31", "secure_link": "http://example.com/c/portal.php?...", "created_at": 1715000000 } ], "last_update": 1715000100 }
POST /api/scan

Start a new MAC scanning job. Results are automatically saved to the database.

Request Body

FieldTypeRequiredDescription
urlsstringYesPortal URLs, one per line
macsstringNo*MAC addresses, one per line
use_examplebooleanNoGenerate example MACs
example_countintegerNoNumber of example MACs (default: 100)
thread_countintegerNoConcurrent threads (default: 4, max: 16)
output_typestringNoMAC_AND_IPTV_S_LINKS, MAC_ONLY, IPTV_S_LINKS

* Required if use_example is false

Example Request

POST /api/scan Content-Type: application/json X-CSRF-Token: token_from_page { "urls": "http://portal1.com/stalker_portal http://portal2.com/c", "macs": "00:1A:79:00:00:01 00:1A:79:00:00:02", "thread_count": 4, "output_type": "MAC_AND_IPTV_S_LINKS" }
POST /api/submit

Submit a single IPTV link manually. Useful for importing existing links.

Request Body

FieldTypeRequiredDescription
portal_urlstringYesPortal URL
macstringYesMAC address (XX:XX:XX:XX:XX:XX)
statusstringNoVALID, INVALID, PENDING, ERROR (default: VALID)
exp_datestringNoExpiry date
usernamestringNoAccount username
passwordstringNoAccount password
secure_linkstringNoPre-generated secure link
GET /api/stats

Get current site statistics.

Response Fields

FieldTypeDescription
totalLinksintegerTotal valid links
totalScansintegerTotal scan jobs
totalPortalsintegerUnique portals
todayLinksintegerLinks discovered today
lastUpdateintegerUnix timestamp of last update
GET /api/export/{format}

Export links in various formats. Supports json, csv, and txt.

Path Parameters

ParameterDescription
formatExport format: json, csv, or txt

Query Parameters

ParameterDescription
portalFilter by portal URL
date_fromStart date (YYYY-MM-DD)
statusFilter by status

Quick Reference

Status Codes

  • VALID Active working link
  • INVALID MAC rejected by portal
  • PENDING Scan in progress
  • ERROR Connection failed
  • NEW Discovered in last hour

Rate Limits

60 requests/minute for public API
1000 requests/minute with API key

Response Codes

  • 200 OK - Success
  • 400 Bad Request - Invalid parameters
  • 401 Unauthorized - Invalid API key
  • 429 Too Many Requests - Rate limited
  • 500 Server Error - Internal error