--- id: opentok version: "3.14.0" license: LICENSE.txt license_treatment: permissive maintenance: active --- # opentok — OpenTok server-side SDK License: permissive · Maintenance: active · Downloads: 1.0M/mo ## What it is and what it does The OpenTok Python SDK is a server-side library for interacting with the Tokbox/OpenTok platform, which provides real-time video and audio communication infrastructure. It lets you programmatically create sessions, generate access tokens for clients, start and manage session recordings (archives), and configure session parameters like media routing and end-to-end encryption. The library wraps HTTP calls to the OpenTok API using standard dependencies like requests and JWT signing via pyjwt and rsa. You use it in a backend service to provision sessions and tokens that your client applications (web, mobile, desktop) then use to connect to video rooms. It handles the server-side orchestration—session creation, token generation with role-based access control, archive management—while the actual media streaming happens client-side. The package is designed specifically for the Tokbox platform; the description notes that new projects should consider the Vonage Server SDK for Python instead, which supports the newer unified Vonage Video API. Use it for: - Generate secure session tokens in a backend API to provision video rooms for client applications. - Start and manage session recordings (archives) with configurable output modes and resolution settings. - Create sessions with specific media routing and archiving modes for different application requirements. - Add or remove individual streams from an active archive during a session. - Implement role-based access control by generating tokens with different roles (moderator, subscriber) for session participants. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Server-side SDK for generating OpenTok sessions, tokens, and managing session archives via the Tokbox/OpenTok platform API. Yes, if you are actively using the Tokbox/OpenTok platform and need server-side session and token management. The package is stable, actively maintained, has low install friction, and carries no known vulnerabilities. However, if you are starting a new project, verify whether you should use the newer Vonage Server SDK for Python instead, which supports the unified Vonage Video API platform. ## Install pip install opentok uv add opentok poetry add opentok ## Installing opentok Before you install: Low install friction with five lightweight runtime dependencies (requests, six, pytz, pyjwt, rsa). Package is actively maintained with recent releases and a stable codebase. License in practice: MIT license (permissive) allows use in commercial and proprietary projects with minimal restrictions. Quickstart: pip install opentok from opentok import Client opentok = Client(api_key, api_secret) session = opentok.create_session() token = session.generate_token() Requires valid Tokbox/OpenTok API credentials (api_key and api_secret) to authenticate with the platform. Verify before relying: - Whether the package works with Python versions older than 3.9 despite classifiers listing 3.9–3.13. - Current status of Tokbox platform relative to the newer Vonage unified platform and whether migration is recommended for new projects. ## Package facts - License: LICENSE.txt (permissive) - Python support: unspecified - Install friction: low - Maintenance: active - Downloads: 1.0M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags opentok session token generation, tokbox video api python, webrtc session management, video archive recording sdk, real-time communication sessions, vonage video api server sdk, session archiving python, video-conferencing, webrtc, session-management [View on SkillFed](https://skillfed.io/packages/opentok) · [View on PyPI](https://pypi.org/project/opentok/)