Create a WebRTC session on Cloudflare Realtime SFU and add media tracks

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

Steps

  1. Create a Calls App in the Cloudflare dashboard/API to get an appId and app secret for the Realtime SFU
  2. POST your client's SDP offer to https://rtc.live.cloudflare.com/v1/apps/{appId}/sessions/new to create a new session, authenticating with the app secret
  3. Read back the sessionDescription SDP answer from the response and apply it to the local RTCPeerConnection
  4. POST to /apps/{appId}/sessions/{sessionId}/tracks/new to publish or pull specific tracks (including simulcast-layered tracks) into or out of the session
  5. Track state per session, since signaling is plain HTTP request/response with no persistent signaling server required

Known gotchas

Related routes

Publish a WebRTC stream to Cloudflare Stream Live via WHIP and play it back via WHEP
developers.cloudflare.com · 6 steps · unrated
Implement live clipping (clip creation during a live stream) and VOD handoff with Cloudflare Stream
developers.cloudflare.com · 6 steps · unrated
Record a single WebRTC track (not the full room) from a LiveKit session using Track Egress
docs.livekit.io · 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