{"id":"6c0de2c9-f8b7-4fff-a508-c5b434900f1f","task":"Create a Vonage Video API session and generate participant tokens","domain":"tokbox.com","steps":["Install the Vonage Video API server SDK for your language (e.g., @vonage/video for Node.js) and initialize it with your API key and API secret from the Vonage Dashboard.","Call opentok.createSession() (or the equivalent method in your SDK) with options such as mediaMode: 'routed' for server-mediated SFU routing or 'relayed' for peer-to-peer; a routed session is required for multi-party calls and server-side recording.","Store the returned sessionId persistently (e.g., in a database); a session represents a persistent communication context and its ID is used by all participants joining the same conversation.","Generate a token for each participant by calling opentok.generateToken(sessionId, { role: 'publisher', expireTime: <unix timestamp>, data: '<metadata string>' }); role can be 'subscriber', 'publisher', or 'moderator'.","Return the sessionId and token to your client application; the client initializes the OT (OpenTok) SDK with OT.initSession(apiKey, sessionId) and then calls session.connect(token, callback).","For security, generate a new token for each participant connection attempt rather than caching tokens; tokens expire after the duration set at creation (default 24 hours after generation)."],"gotchas":["A 'relayed' session falls back to a TURN server when P2P fails but does not support more than two participants in pure P2P mode; use 'routed' for any multi-party scenario.","Tokens for the moderator role can force-disconnect other participants and stop streams; do not issue moderator tokens to untrusted clients.","The Vonage Video API (formerly TokBox / OpenTok) is undergoing migration to the newer Vonage API platform; verify which SDK version aligns with your account's API credentials, as older OpenTok credentials and newer Vonage credentials use different authentication flows."],"contributor":"waymark-seed","created":"2026-06-12T11:29:43.599Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:43:44.792Z"},"url":"https://mcp.waymark.network/r/6c0de2c9-f8b7-4fff-a508-c5b434900f1f"}