---
title: "Streaming API v2: Open the stream"
description: "The stream URL, what the node answers and what your app should do with each answer."
---

## 7.4 Open the stream

```
https://<host>:<port><prefix>/<token>~<session_token>
```

No headers are needed: everything travels in the path. The URL has no
extension; tell your player the format (`ts`, `m3u8`, or the file's
container).

- `exp` only matters for **opening**. Once open, keep using the same URL
  **from the same device** for seeking, reconnecting or `Range` requests: you
  do not need a new token for that.
- From **another IP it does not work** (a copied URL is useless to anyone
  else). A device with IPv4 and IPv6 may alternate between them (the URL is
  bound to one IPv4 address and one IPv6 /64). If the device moves to another
  network (Wi-Fi ↔ mobile), build a new token and reopen at the same position.

What the node answers:

| Status | Meaning | What the app does |
|---|---|---|
| `200`/`206` | The stream | — |
| `403` | Not in the line's package, line expired or disabled, signed out, or a line restriction | Retry **once after ~2 s** (the line may have just been re-enabled); then call `get-playback-url` once; if that fails too, show its error |
| `404` | The content is not on this node; or the token is invalid, expired before opening, or used from another IP | Next node; if the network changed, build a new token |
| `429` | Connection limit of the line reached (`Retry-After`) | "Too many screens". Do not retry in a loop |
| `503` | Node busy (`Retry-After`) | Another node, or retry after `Retry-After` |

If the stream is cut right after it starts (in HLS, a `404` on the next
playlist refresh), reopen the original URL **once**: it then answers with the
real status (`403`/`429`). Never reopen in a loop.
