Getting Started
Add real-time voice rooms to your app in under 30 minutes.
1. Create an account
Sign up at voxastream.com/sign-up to get your account. You'll land on the dashboard where you can manage API keys.
2. Create an API key
From your dashboard, go to API Keysand create a new key. You'll receive two values:
key— your secret API key (starts withvc_). Keep this server-side only.client_id— your public client ID (starts withvc_client_). Safe to embed in mobile apps.
3. Authenticate a user
Call /api/auth/auto from your backend to get a session token for a user:
POST /api/auth/auto
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
{ "username": "alice" }
// Response
{
"token": "abc123...",
"refresh_token": "xyz...",
"expires_in": 3600,
"user": { "id": 1, "username": "alice" }
}4. Connect to a room
Use the token to connect via WebSocket and join a voice channel:
const ws = new WebSocket('wss://your-api.com/ws?token=' + token);
ws.onopen = () => {
ws.send(JSON.stringify({
type: 'join_channel',
payload: { channel_id: 1, role: 'speaker' }
}));
};
ws.onmessage = (event) => {
const msg = JSON.parse(event.data);
if (msg.type === 'webrtc_offer') {
// Handle audio negotiation
}
};