> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://fastpix.com/docs/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://fastpix.com/docs/_mcp/server.

# Stream a private channel with signed playback

Serve a Cloud Playout channel's live output as private and let viewers play it only with a signed JWT, driving the whole flow through the REST API and the FastPix C# SDK.

## How private playout works

A Cloud Playout channel broadcasts its program as a FastPix **live stream**, so you secure a channel the same way you secure any live stream: give the stream a **private** playback ID and require a signed **JWT** on every playback request. A public playback URL would let anyone watch, so the private channel keeps exactly one private playback ID and no public one.

The token is a short JSON Web Token signed with a key pair you create. FastPix keeps the public key and verifies the token when the player loads the stream. You keep the private key and mint a token per viewer on your server.

\


## Before you begin

Make sure you have the following:

* A FastPix account, plus your **Access Token ID** and **Secret Key**. All REST calls use Basic auth against `https://api.fastpix.com/v1`, with the Access Token ID as the username and the Secret Key as the password. See [Activate your account](/docs/getting-started/activate-your-account).
* Content imported and organized into playlists. See [Import and organize content](/docs/cloud-playout/import-and-organize-content).
* A scheduled channel. See [Create a scheduled channel](/docs/cloud-playout/create-a-scheduled-channel).
* For C# examples, the FastPix C# SDK installed (`dotnet add package Fastpix`). See [C# SDK](/docs/language-sdks/csharp-sdk).

> **Note:** Creating, reading, activating, deactivating, and deleting a channel use the Cloud Playout channel lifecycle endpoints. To access these endpoints, [contact FastPix support](https://www.fastpix.com/contact-us) to have them enabled for your workspace. You can also create and activate a scheduled channel from the dashboard. Everything in the signed-playback steps below (playback IDs, signing keys, tokens) is available in the REST API and the SDKs.

\


## Set up and activate the channel

Create a scheduled channel and activate it so its live output starts. The channel must contain at least one scheduled event, and you activate it ahead of its start time.

* **In the dashboard:** follow [Create a scheduled channel](/docs/cloud-playout/create-a-scheduled-channel) and [Monitor and manage channels](/docs/cloud-playout/monitor-and-manage-channels).
* **Through the API, no dashboard:** [contact FastPix support](https://www.fastpix.com/contact-us) to get access to the channel lifecycle endpoints for your workspace.

Adding scheduled content to an existing channel is available directly in the REST API. Add events to a scheduled channel with a single request:

```bash
curl -X POST "https://api.fastpix.com/v1/cloud-playout/channels/{channelId}/schedule-events" \
  -u "{Access_Token_ID}:{Secret_Key}" \
  -H "Content-Type: application/json" \
  -d '{
    "events": [
      { "type": "vod", "startTime": "2026-01-01T12:00:00Z" }
    ]
  }'
```

\


## Make the channel output private

Each channel broadcasts through an underlying live stream, identified by its live stream ID (`destinationLiveId`). Read it from the channel's details (in the dashboard, or through the channel API if FastPix has enabled it for you).

Create a **private** playback ID on that live stream:

```bash
curl -X POST "https://api.fastpix.com/v1/live/streams/{destinationLiveId}/playback-ids" \
  -u "{Access_Token_ID}:{Secret_Key}" \
  -H "Content-Type: application/json" \
  -d '{ "accessPolicy": "private" }'
```

```csharp
var res = await sdk.LivePlayback.CreateAsync(
    streamId: destinationLiveId,
    body: new PlaybackIdRequest
    {
        AccessPolicy = BasicAccessPolicy.Private
    }
);

// res.PlaybackIdSuccessResponse holds the new private playbackId
```

Then delete the channel's public playback ID so no unsigned URL can reach the stream:

```bash
curl -X DELETE "https://api.fastpix.com/v1/live/streams/{destinationLiveId}/playback-ids?playbackId={publicPlaybackId}" \
  -u "{Access_Token_ID}:{Secret_Key}"
```

```csharp
await sdk.LivePlayback.DeletePlaybackIdAsync(
    streamId: destinationLiveId,
    playbackId: publicPlaybackId
);
```

> **Note:** You can further restrict a private playback ID to specific domains or user agents. See the live playback restriction endpoints in the [API reference](/docs/live-stream-api/overview).

\


## Create a signing key

A signing key is a 2048-bit RSA key pair. FastPix returns the private key once and stores only the public key, so save the private key securely.

```bash
curl -X POST "https://api.fastpix.com/v1/iam/signing-keys" \
  -u "{Access_Token_ID}:{Secret_Key}"
```

```csharp
var res = await sdk.SigningKeys.CreateAsync();

// res.CreateResponse.Data.Id         -> the key ID (kid)
// res.CreateResponse.Data.PrivateKey -> the RSA private key, Base64-encoded
```

The response returns the key ID (`kid`) and the Base64-encoded private key. Base64-decode the private key before you use it to sign tokens.

\


## Generate a signed JWT

Sign a short-lived RS256 token on your server. Set the audience to the private playback ID so the token is only valid for this channel.

| Claim          | Value                                                              |
| -------------- | ------------------------------------------------------------------ |
| `kid` (header) | The signing key ID from the previous step                          |
| `aud`          | `media:<playbackId>`, the private playback ID                      |
| `exp`          | Unix timestamp (seconds) when the token expires                    |
| `sub`          | Optional. A viewer identifier, so each viewer gets their own token |
| `iss`          | Optional. For example `fastpix.com`                                |

```csharp
using System.Security.Cryptography;
using Microsoft.IdentityModel.Tokens;
using System.IdentityModel.Tokens.Jwt;
using System.Security.Claims;

// kid and privateKeyBase64 come from the signing-key response; playbackId is the private playback ID.
var rsa = RSA.Create();
rsa.ImportFromPem(
    System.Text.Encoding.UTF8.GetString(Convert.FromBase64String(privateKeyBase64))
);

var handler = new JwtSecurityTokenHandler();
var descriptor = new SecurityTokenDescriptor
{
    Audience = $"media:{playbackId}",
    Subject = new ClaimsIdentity(new[] { new Claim("sub", "viewer-123") }),
    Expires = DateTime.UtcNow.AddHours(1),
    SigningCredentials = new SigningCredentials(
        new RsaSecurityKey(rsa) { KeyId = kid },
        SecurityAlgorithms.RsaSha256)
};

string token = handler.WriteToken(handler.CreateToken(descriptor));
```

> **Caution:** Sign tokens on your server and never ship the private key or a long-lived token in client code. For quick manual testing only, FastPix offers a hosted signer at `https://jwt.fastpix.co`; do not use it in production.

\


## Play the private channel

Append the token to the channel's playback URL as a `token` query parameter:

```
https://stream.fastpix.com/<playbackId>.m3u8?token=<JWT>
```

With the FastPix Player web component, pass the token as an attribute:

```html
<fastpix-player
  playback-id="<playbackId>"
  token="<JWT>"
  stream-type="live-stream">
</fastpix-player>
```

Video.js, hls.js, and other HLS players load the same tokenized `.m3u8` URL directly.

\


## Renew tokens during playback

The token is checked when the player loads the playlist, not on every segment, so an expiring token does not interrupt a session already playing. Issue a fresh token on each source load (a reload, or the viewer re-joining). A **1 hour** lifetime is a good default: short enough to limit a leaked token, long enough that most sessions never need a mid-session refresh.

\


## What authorization protects

* The JWT is validated on the **master playlist**. A missing, expired, tampered, or wrong-playback-ID token returns **401**.
* Rendition playlists and media segments are served through **FastPix-signed URLs** scoped to the playback ID. An unsigned segment request returns **404**, and the CDN caches only signed URLs.
* The viewer's JWT is **not** re-checked per segment. Authorization happens at playlist load, and segment access is enforced by the FastPix-signed URLs.

\


## Revoke access

FastPix does not offer per-viewer revocation or a session validation callback. To cut off access you have two options, both broad:

* **Delete the signing key.** Every token signed with that key stops working immediately. See `DeleteAsync` on `SigningKeys`.
* **Recreate the playback ID.** Delete the private playback ID and create a new one, which changes the URL for everyone.

**Continued-playback window after expiry:** a session already in progress keeps playing until the player re-requests the master playlist (a reload or re-join). New sessions are refused once the token has expired. There is no immediate mid-session cutoff for a single viewer.

\


## Stop and clean up

Deactivate the channel when the broadcast ends (it returns to an idle state), and delete it when you no longer need it. Like creation and activation, deactivate and delete use the channel lifecycle endpoints: run them from the dashboard, or [contact FastPix support](https://www.fastpix.com/contact-us) to get API access for API-only operation.

\


#### Frequently asked questions

Yes. A channel broadcasts as a FastPix live stream, so you add a private playback ID to that stream and play it with a signed RS256 JWT. Create the private playback ID with `POST /live/streams/{streamId}/playback-ids` and a `"private"` access policy, create a signing key with `POST /iam/signing-keys`, and append `?token=<JWT>` to `https://stream.fastpix.com/<playbackId>.m3u8`.

Both. The JWT is validated on the master playlist, and the rendition playlists and segments are served through FastPix-signed URLs scoped to the playback ID. Unsigned segment requests return 404, and the CDN caches only signed URLs. The viewer JWT is checked at playlist load rather than on every segment.

Not individually. FastPix has no per-viewer revocation or session callback. You can delete the signing key, which invalidates every token signed with it, or recreate the playback ID, which changes the URL for everyone. A session already playing continues until the player re-requests the master playlist; new sessions are refused once the token has expired.

The signed-playback pieces (playback IDs, signing keys) are in the REST API and the C# SDK. For the channel lifecycle operations (create, read, activate, deactivate, delete), contact FastPix support to get access to those endpoints for your workspace, so you can run the full lifecycle with no dashboard login.

\


## What's next

* [Create a scheduled channel](/docs/cloud-playout/create-a-scheduled-channel) to program the channel this workflow secures.
* [Monitor and manage channels](/docs/cloud-playout/monitor-and-manage-channels) to activate and watch the broadcast.
* [Generate JWTs for secure media](/docs/video-security/generate-jwts-for-secure-media) for the signing-key and token details shared with on-demand playback.