Skip to main content

Tosses.dev has been shut down

User data has been deleted in accordance with our legal pages.

API Docs v1

Overview

Request TURN credentials from your server, hand them to your client. Two endpoints, no SDK required.

Base URL

https://api.tosses.dev/v1

Authentication

Pass your API key as key in the JSON request body. Keys are per-app and available from the dashboard. Never send your API key from client-side code; request credentials from your own backend and forward them to the client.

Endpoints

EndpointPurpose
POST /v1/credentialsGet TURN credentials for a user session. Supports regular credentials and gateway-pinned sessions.
POST /v1/exchangeLightweight signaling store. Save up to 10KB of string data in a namespace for 10 minutes to be picked up by another peer.

Relay Selection

When you request credentials, Tosses geolocates the host_ip (or your server's IP if omitted) and routes to the closest healthy relay based on network proximity and real-time load. If multiple relays tie on location, the least-loaded one wins. Relay health is tracked continuously; overloaded or offline relays are excluded automatically.

IPs are never stored or logged, and are used only for routing purposes.