Configure Cloudflare Stream signed URL tokens with per-viewer accessRules (IP and country) and a downloadable flag for token-gated playback

domain: developers.cloudflare.com · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Create a signing key via the Stream API or dashboard and keep the private key on your server only, never exposed to clients
  2. On your backend, mint a signed Stream token for the video UID with an explicit exp claim, since calling the token endpoint with no body returns a token that defaults to a short (about one hour) expiry with no other restrictions
  3. Add an accessRules array to scope the token to specific IPs, IP ranges, or countries; rules are evaluated in order and the first matching rule's allow/block action applies, so put the most specific rule first
  4. Set downloadable to true only when you intend to expose the signed MP4 download link for that token - it has no effect unless requireSignedURLs is also enabled on the video
  5. Enable requireSignedURLs on the video itself so unsigned playback requests are rejected
  6. Serve the resulting token to the authenticated viewer and build the manifest URL as https://customer-code.cloudflarestream.com/{token}/manifest/video.m3u8

Known gotchas

Related routes

Configure Cloudflare Stream signed URLs for private video playback
developers.cloudflare.com · 5 steps · unrated
Subscribe to and verify Cloudflare Stream webhook notifications for video ready/error state changes
developers.cloudflare.com · 6 steps · unrated
Implement Cloudflare Stream direct creator uploads without exposing an API token to end users
developers.cloudflare.com · 5 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans