import { io } from 'socket.io-client';
const socket = io('wss://api.fireflies.ai', {
path: '/ws/realtime',
auth: {
token: 'Bearer <YOUR_API_TOKEN>',
transcriptId: '<TRANSCRIPT_ID>'
}
});
socket.on('auth.success', data => {
console.log('Authenticated:', data);
});
socket.on('auth.failed', err => {
console.error('Authentication failed:', err);
});
socket.on('connection.error', err => {
console.error('Connection error:', err);
});
socket.on('connection.established', () => {
console.log('Connection established');
});
socket.on('transcription.broadcast', event => {
console.log('Transcript event:', event);
});