NexgenStreamerNexgenStreamer
Docs menu

BinStream API

Setup

Set runtime.binstream_enabled to true in the control server runtime configuration; the routes are disabled by default. Use https://<management-host>/api/v1in as the management URL and https://<broker-host> as the online-session origin, with no trailing slash. Both can use the same host. Send the configured management api_key as t and the separately configured broker_token as token. Each key acts with its operator’s permissions and scope.

The Strict BinStream usernames setting in Settings requires the full email to match the line username. With it off, the server can fall back to the part before @. Deduct credits for BinStream panel requests, in Packages, is off by default because the management panel charges its own credits.

Calls

HTTP Returns
GET /api/v1in/user?t=… Complete authorized collection if no pagination is given
GET /api/v1in/user?t=…&limit=1 Array for a connectivity check
GET /api/v1in/user?t=…&email=… Exact email match in the first array entry, or an empty array
GET /api/v1in/user?t=…&page=…&limit=1000&skip=…&exField1=… Reconciliation page, optionally filtered by reseller username
GET /api/v1in/user?t=…&page=…&limit=10000&skip=…&exField1=… Import page of up to 10000 results, optionally filtered by reseller username
POST /api/v1in/user?t=… Creates a line and returns the user record with lowercase id and email
PUT /api/v1in/user/{id}?t=… Updates, renews, enables or disables a line and returns the updated record
DELETE /api/v1in/user/{id}?t=… Deletes the line
GET /api/v1in/product?t=… Lists the products available to the operator
PUT /api/v1in/reseller/{id}?t=… Changes the reseller tree
GET /v1/users_online?token=… Lists live sessions in scope as a bare array
GET https://api1.<derived-domain>/cache/vod Public VOD metadata without a token

User writes

Send JSON with the fields shown below. productId is a string; type is 0 for trial or 1 for regular. The compatibility status values are -1 (registered), 0 (disabled) and 1 (enabled). exField1, exField2 and exField4 may be null; exField2 accepts a numeric reseller ID.

{
  "productId": "42",
  "endTime": "2027-01-29T12:00:00",
  "startTime": "2026-12-29T12:00:00",
  "type": 1,
  "status": 1,
  "serviceTag": "example",
  "password": "<password>",
  "email": "[email protected]",
  "name": "demo",
  "exField1": "reseller",
  "exField2": 123,
  "exField3": "<password>",
  "exField4": null
}

Dates accept ISO timestamps with an offset, timestamps without an offset (read in the integration’s configured timezone), or epoch milliseconds. A valid explicit expiry overrides the package trial duration.

Read records and pagination

Records contain id (numeric), email, name, productId, type, status, regTime, updateTime, startTime, endTime, serviceTag, and exField1 through exField4. exField3 contains the password and belongs only in authorized management responses. skip overrides the offset calculated from page and limit. Results are ordered by ID. Keep increasing skip by limit until the result is [].

Responses and products

Successful creation returns 201, and updates return 200. Neither response has a message. Deletion returns {"message":"User status updated to deleted"}. A missing object returns 404 with {"message":"Object not found"}. A duplicate returns 400 with {"message":"User already exists"}. Invalid credentials return HTTP 403 with {"status":403,"message":"No Authentication","name":"NoAuthentication"}.

Products map to NexgenStreamer packages. Each row has string id, name, max_connections and duration_hours when supplied. The management panel also uses these products for its bouquet selector.

Reseller tree

This NexgenStreamer extension takes exactly {"status":0} to disable or {"status":1} to enable the reseller, descendant users and their lines. It returns id, status, users and lines. Enabling restores lines disabled individually as well, while administrative bans stay in place.

Online sessions and VOD metadata

user_id is the numeric management id. duration is elapsed seconds. Access requires operations read permission.

[
  {
    "user_id": 123,
    "external_ip": "203.0.113.20",
    "channel_name": "Example Live",
    "app_name": "P2PClient",
    "app_version": "1",
    "device_model": "Example",
    "os_version": "Android",
    "duration": 120,
    "role": "peer"
  }
]

The public /cache/vod projection includes name.init, tags[0].name.init, logo.image.big, added and sources for classification. Playable addresses are omitted.

The installer can add auth1.<parent> and api1.<parent> to the public certificate, where <parent> is the registrable domain. For dns.example.com, use auth1.example.com and api1.example.com. Point each alias’s A record at this host, and its AAAA record too when IPv6 is configured. The twice-daily renewal picks up eligible aliases. If an alias fails validation, the main domain certificate stays in place.