On this page
TL;DR — Part A (about 5 minutes, server only): create a key, read your configuration, list your catalog. Part B (needs your app on a real phone with the Player SDK): get a first ticket and play an episode. A ticket cannot be tested with
curlalone: its device values only exist on a device.
Every command below uses one environment variable, WANDURA_API_KEY. Part B adds UNION_INFO and DRM_KEK, copied from your app.
Before you start
- A member account with the Admin or Developer role in your organisation on partner.wandura.ai. No access yet? See Before you start.
- At least one film licensed to your organisation, or the catalog is empty.
- For Part B only: the Player SDK set up in your app, with a licence for your app IDs. See Player SDK.
Part A — your first calls (server only)
Step 1: Create a key
Needs: the Admin or Developer role.
- Sign in to partner.wandura.ai and open Developers → Create a key.
- Label it, for example
quickstart, and pick Stream films in an app. The key getsmetadata:readandplayback. - Select Create key and copy it now: it is shown once.
export WANDURA_API_KEY="wnd_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"If it fails: no Developers page means your role is not Admin or Developer: ask your organisation Admin. Next: step 2.
Step 2: Read your configuration
Needs: the key from step 1 (any scope works).
curl -s https://www.wandura.ai/api/delivery/v1/config \
-H "Authorization: Bearer $WANDURA_API_KEY"Expect 200 with your key's scopes, your limits and the API version your key is pinned to (shortened):
{
"api": { "status": "beta", "version": "2026-10-02", "pinned_version": "2026-10-02", "latest_version": "2026-10-02" },
"key": { "scopes": ["metadata:read", "playback"] },
"rate_limits": { "window_seconds": 60, "doors": { "playback": { "limit": 10800, "unit": "tickets" } } },
"playback": { "grant_ttl_seconds": 1800, "batch": { "max_episodes": 3, "max_next": 2 } }
}If it fails: 401 = the variable is empty or the key was mistyped (echo ${#WANDURA_API_KEY} should print 41). 503 = retry after Retry-After. Next: step 3.
Step 3: List your catalog
Needs: a key with metadata:read.
curl -s https://www.wandura.ai/api/delivery/v1/catalog \
-H "Authorization: Bearer $WANDURA_API_KEY"Expect 200 with films (in display order) and episodes (shortened):
{
"films": [
{ "id": "3f6c1a52-8d0e-4b7a-9c21-5e4f2a7b9d10", "title": "The Heiress Returns", "slug": "the-heiress-returns", "display_order": 10, "free_until_episode": 1 }
],
"episodes": [
{ "id": "b2a4d6e8-1c3f-4a5b-8d7e-9f0a1b2c3d4e", "film_id": "3f6c1a52-8d0e-4b7a-9c21-5e4f2a7b9d10", "episode_no": 1, "status": "published", "stream_ready": true, "poster_url": null }
]
}Pick an episode with "stream_ready": true and note its id for Part B. Large catalog? Page it with limit; see Catalog sync.
If it fails: an empty 200 ("films": []) means no licence is active for your organisation yet, not a broken key: ask Wandura in your team's Discord channel. 403 = the key lacks metadata:read. Next: build the catalog sync job, or go on to Part B.
Part B — first ticket on a real device
Needs: your app on a real iPhone or Android phone with the Player SDK started and its licence check passed, and your playback key on your backend. Simulators and emulators do not produce usable device values.
Warning: Every ticket Wandura issues is recorded, and with
"intent": "play"it counts as a view of the film. Do these steps with a real device and a real test viewer, not with made-up values.
Step 4: Read the device values in your app
In your app, after the Player SDK has started, read the device ID and the device public key (the exact calls are in the Player SDK guide on the portal), and log them once in a debug build. On your backend shell:
export UNION_INFO="<device ID logged by your debug build>"
export DRM_KEK="<device public key logged by your debug build>"If it fails: a value such as (null) or an empty string means the SDK had not started or its licence check failed. See Player SDK.
Step 5: Request a ticket
From your backend, for the episode you picked in step 3:
curl -s -X POST https://www.wandura.ai/api/delivery/v1/playback \
-H "Authorization: Bearer $WANDURA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"episode_id": "b2a4d6e8-1c3f-4a5b-8d7e-9f0a1b2c3d4e",
"union_info": "'"$UNION_INFO"'",
"drm_kek": "'"$DRM_KEK"'",
"viewer_ref": "qa-viewer-1:device-1",
"intent": "play"
}'If UNION_INFO and DRM_KEK are empty, Wandura answers 409 sdk_required and issues nothing.
Expect 200:
{
"vid": "v0d2f8c1a9e4b7",
"play_auth_token": "placeholder-play-token",
"expires_at": "2026-10-02T12:30:00.000Z",
"protection": "private-encrypted",
"subtitles": [
{ "lang": "en", "url": "https://cdn.example.com/subtitles/ep1-en.vtt", "format": "webvtt" }
]
}If it fails: 400 invalid_device_info = a device value looks empty (fields says which). 403 not_entitled = the film is not licensed to this organisation. 404 not_ready = wrong episode_id, or the episode is not ready. All codes: Errors.
Step 6: Play it
Return vid, play_auth_token and subtitles to the same device. There, give the video ID and the token to the Player SDK and start playback; the SDK fetches the encrypted stream and its keys itself. A standard HLS player cannot play these episodes: it loads the playlist and stalls.
Expect the episode to start within a few seconds. If it fails: see Player SDK · common problems. The ticket expires at expires_at (30 minutes); asking again for the same episode on the same device with the same viewer_ref returns the same ticket while it has more than 5 minutes left.
Next steps
- Integration roadmap: the full path to go-live.
- Playback flow and paywall: the backend endpoint your app calls, with code.
- Security: before any key reaches a server you share.
Updated 3 Oct 2026 · Change history (2)