Skip to Content
API reference

Share page API

The token endpoint behind a share link's page.

It needs no session or key.

POST /s/{secret}/playback

What the share page's script asks for: a v token for the link's playback ID, valid until the earliest of the link's expiry, max(2 x duration, 4 h) and the longest token lifetime. A viewer_id of 16 to 64 [A-Za-z0-9_-] characters counts as a unique viewer.

Authentication: None.

Parameters

NameInTypeRequiredDescription
secretpathstringyes

Request body

FieldTypeRequiredDescription
viewer_idstringno
{
  "viewer_id": "b7f3k9q2m4x8r1v6t0w5"
}

Response 200

A token for the link's playback ID

{
  "title": "Lesson 42: Sorting",
  "duration_seconds": 1830.4,
  "base_url": "https://media.example.com",
  "playback_id": "pid_01jmgkyp0c3ct46ees12paekfv",
  "token": "eyJhbGciOiJFUzI1NiIs...",
  "expires_at": "2026-11-18T13:30:00Z",
  "poster_url": "https://media.example.com/v/eyJhbGciOiJFUzI1NiIs.../pid_01jmgkyp0c3ct46ees12paekfv/poster.jpg",
  "tracks": [
    {
      "id": "trk_01j0qtsj1vyp4dyn7fsdkb9t8q",
      "kind": "subtitles",
      "source": "generated",
      "status": "ready",
      "language": "en",
      "name": "English"
    }
  ]
}

Errors

On this page