1. Create an access-control webhook
In Livepeer Studio โ Developers โ Webhooks, create a webhook with type playback.accessControl and the URL of your endpoint (e.g.https://yourdomain.com/api/check-access).
2. Create gated content
When creating the stream or asset, setplaybackPolicy to the webhook type and your webhook ID and context:
livepeer.asset.create with playbackPolicy.
3. Configure the Player
Pass an access key (e.g. session token or user id) to the Player. The Player sends it to Livepeer, which forwards it to your webhook:4. Handle the webhook
Your endpoint receives a POST withaccessKey and context. Validate the key (e.g. check auth, subscription). Return 2XX to allow playback, non-2XX to deny.
Custom player: For WebRTC or HLS, send the access key in the Livepeer-Access-Key header or as query param accessKey on the playback URL.