Get media relay credentials
/relay-credentialsView source specification ↗Issues short-lived TURN credentials for the Port OS media relay to the authenticated principal. Use them as ICE servers when a WebRTC peer, such as port message record, cannot reach a camera or robot directly. The relay accepts TCP only, relays to public IPv4 peers only, and limits concurrent allocations per principal. Each call mints new credentials and stores nothing, so the response is never cached. Credentials stop working at expiresAt.
Required scope
Any authenticated access token
Returns
200
Relay credentials issued
Fields
Response headers
- Cache-Control
string Always `no-store`; the response carries a credential.
Errors
401 UNAUTHORIZEDUnauthorized
Obtain a valid access token, then retry.
500 INTERNALInternal server error
Retry with backoff only when the operation is safe to repeat. Include the error code when reporting persistent failures.
503 SERVICE_UNAVAILABLEThis deployment runs no media relay
Wait for the provider or bridge to recover, then retry safely with backoff.