Fetch the WHEP playback URL (consumer)
curl --request GET \
--url https://api.luxxon.dev/api/v1/api/v1/sessions/{id}/viewer-token \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.luxxon.dev/api/v1/api/v1/sessions/{id}/viewer-token"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.luxxon.dev/api/v1/api/v1/sessions/{id}/viewer-token', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.luxxon.dev/api/v1/api/v1/sessions/{id}/viewer-token",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.luxxon.dev/api/v1/api/v1/sessions/{id}/viewer-token"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.luxxon.dev/api/v1/api/v1/sessions/{id}/viewer-token")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.luxxon.dev/api/v1/api/v1/sessions/{id}/viewer-token")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"statusCode": 200,
"message": "Request successful",
"data": {
"videoBackendRef": "6a7aab6e273b40251e8ee72d7ca05719",
"whepUrl": "https://customer-CODE.cloudflarestream.com/UID/webRTC/play"
},
"timestamp": "2026-05-13T12:00:00.000Z"
}{
"statusCode": 401,
"code": "NOT_AUTHENTICATED",
"message": "Session expired or missing",
"detail": "not_authenticated:example",
"timestamp": "2026-05-13T12:00:00.000Z"
}{
"statusCode": 403,
"code": "NOT_AUTHORIZED",
"message": "Not authorized for this operation",
"detail": "not_authorized:example",
"timestamp": "2026-05-13T12:00:00.000Z"
}{
"statusCode": 404,
"code": "SESSION_NOT_FOUND",
"message": "Session not found",
"detail": "session_not_found:example",
"timestamp": "2026-05-13T12:00:00.000Z"
}{
"statusCode": 409,
"code": "INVALID_STATE",
"message": "Operation not allowed in the current state",
"detail": "invalid_state:example",
"timestamp": "2026-05-13T12:00:00.000Z"
}{
"statusCode": 503,
"code": "VIDEO_ERROR",
"message": "Video service unavailable",
"detail": "video_error:example",
"timestamp": "2026-05-13T12:00:00.000Z"
}Sessions
Fetch the WHEP playback URL (consumer)
Returns the WebRTC WHEP URL for a LIVE session. Stable for the lifetime of the underlying live_input, so this is just a read — call any time you need to (re)connect the player. Authorized for both consumer + operator workspaces.
GET
/
api
/
v1
/
sessions
/
{id}
/
viewer-token
Fetch the WHEP playback URL (consumer)
curl --request GET \
--url https://api.luxxon.dev/api/v1/api/v1/sessions/{id}/viewer-token \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.luxxon.dev/api/v1/api/v1/sessions/{id}/viewer-token"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.luxxon.dev/api/v1/api/v1/sessions/{id}/viewer-token', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.luxxon.dev/api/v1/api/v1/sessions/{id}/viewer-token",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.luxxon.dev/api/v1/api/v1/sessions/{id}/viewer-token"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.luxxon.dev/api/v1/api/v1/sessions/{id}/viewer-token")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.luxxon.dev/api/v1/api/v1/sessions/{id}/viewer-token")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"statusCode": 200,
"message": "Request successful",
"data": {
"videoBackendRef": "6a7aab6e273b40251e8ee72d7ca05719",
"whepUrl": "https://customer-CODE.cloudflarestream.com/UID/webRTC/play"
},
"timestamp": "2026-05-13T12:00:00.000Z"
}{
"statusCode": 401,
"code": "NOT_AUTHENTICATED",
"message": "Session expired or missing",
"detail": "not_authenticated:example",
"timestamp": "2026-05-13T12:00:00.000Z"
}{
"statusCode": 403,
"code": "NOT_AUTHORIZED",
"message": "Not authorized for this operation",
"detail": "not_authorized:example",
"timestamp": "2026-05-13T12:00:00.000Z"
}{
"statusCode": 404,
"code": "SESSION_NOT_FOUND",
"message": "Session not found",
"detail": "session_not_found:example",
"timestamp": "2026-05-13T12:00:00.000Z"
}{
"statusCode": 409,
"code": "INVALID_STATE",
"message": "Operation not allowed in the current state",
"detail": "invalid_state:example",
"timestamp": "2026-05-13T12:00:00.000Z"
}{
"statusCode": 503,
"code": "VIDEO_ERROR",
"message": "Video service unavailable",
"detail": "video_error:example",
"timestamp": "2026-05-13T12:00:00.000Z"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Path Parameters
Example:
"b1e2f3a4-5b6c-7d8e-9f0a-1b2c3d4e5f6a"
⌘I