This is the short path. Your developer makes the token with the playback token guide. How playback protection works explains why the video plays only on your domain.
Before you start
Check three things first:- Your video is ready (not “Processing”, not “Held for review”).
- Your website’s domain is verified in the project. Example:
courses.example.com. - Your server can make a playback token for the video. See Create playback tokens on your server.
vid_9xR4tL.
The embed code
Copy this block into your page’s HTML. Replace two things:vid_9xR4tLwith your video id.YOUR_PLAYBACK_TOKENwith a token from your server.
YOUR_PLAYBACK_TOKEN in the code on purpose, so a
real token never leaks into what you copy.
The video page’s own embed panel (“Add to your website”) ships with the dashboard redesign (YAH-703). Until then, use the guided setup, or copy the block above.
The examples here use the TEST hosttest-cdn.segmnt.cloud. In production the embed host iscdn.segmnt.cloud.
Step 1: Copy the code
Copy the block above, or click Copy code in the dashboard’s guided setup.Step 2: Replace the token
Thetoken= value must be a real playback token for this video. A token:
- is made by your server, never in the browser;
- plays one video on one verified domain;
- expires, by default after 4 hours.
YOUR_PLAYBACK_TOKEN with a live token when it
builds the page. Create playback tokens on your server shows
how, with cURL, Node.js and PHP examples.
Step 3: Paste it into your page
Paste the block where the video should appear.- WordPress: use a Custom HTML block. See Add segmnt to WordPress.
- Another site or page builder: paste it into an HTML block, or build it on your server and send the finished HTML.
If the video does not play
The player shows a short message. The answer also carries a code:Keep the API key secret
Your API key creates tokens, so it is more powerful than a token. Keep it on your server:- never in a web page, an iframe or a Custom HTML block;
- never in a browser, a mobile app or a public repository.
Where to go next
Tested in TEST
Checked on TEST on 15 Oct 2026:GET https://test-cdn.segmnt.cloud/e/{videoId}with no token →403withX-Segmnt-Error: token_missing.GET https://test-cdn.segmnt.cloud/segmnt-player.js→200(the player script is live).- The token check, the domain check and the playlist rewrite are covered by the
playback Worker tests (
playback-worker/src/*.test.ts).