skillfed

opentok

OpenTok server-side SDK

opentok v3.14.0 1.0M downloads/30d#4,488 on PyPI73
Permissive license LICENSE.txt Active released

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 on this page — 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

opentok on PyPI

pip

pip install opentok

uv

uv add opentok

poetry

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 not specified
Install friction low — pure-Python wheel
Runtime dependencies 5 — requests, six, pytz, pyjwt, rsa
Maintenance actively maintained — 50 days since the last release
Last repo commit
First released
Downloads 1,023,853/month — #4,488 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: opentok-3.14.0-py2.py3-none-any.whl

Keywords: video, chat, tokbox, tok, opentok, python, media, webrtc, archiving, realtime

Development Status :: 5 - Production/StableIntended Audience :: DevelopersIntended Audience :: Telecommunications IndustryLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9Topic :: CommunicationsTopic :: Communications :: ChatTopic :: Communications :: ConferencingTopic :: Multimedia :: Sound/Audio :: Capture/RecordingTopic :: Multimedia :: Sound/Audio :: PlayersTopic :: Multimedia :: Video :: CaptureTopic :: Multimedia :: Video :: DisplayTopic :: Software Development :: Libraries :: Python Modules

Tags

opentok session token generationtokbox video api pythonwebrtc session managementvideo archive recording sdkreal-time communication sessionsvonage video api server sdksession archiving python
video-conferencingwebrtcsession-management

More Python Modules packages