Tunnel to the media relay over a WebSocket
/relay-tunnelView source specification ↗Upgrades an authenticated GET to a WebSocket that carries the caller's TURN-over-TCP stream to the Port OS media relay. Use it on networks that pass only HTTPS through a TLS-intercepting proxy, such as an agent sandbox. Send the TURN stream as binary messages and read the relay's replies from binary messages; message boundaries carry no meaning, and a text message ends the tunnel. The relay still authenticates every allocation with credentials from GET /relay-credentials. The tunnel reaches only the deployment's relay, and it closes when either side ends.
Required scope
Any authenticated access token
Returns
101
Connection upgraded; the WebSocket now carries the TURN stream
No response body.
Errors
400 BAD_REQUESTThe request is not a WebSocket upgrade
Check the request fields and any validation details, then correct the payload.
401 UNAUTHORIZEDUnauthorized
Obtain a valid access token, then retry.
503 SERVICE_UNAVAILABLEThis deployment runs no media relay, or the relay could not be reached
Wait for the provider or bridge to recover, then retry safely with backoff.