OpenTok.js / TokBox

The OpenTok platform, developed by TokBox, is a WebRTC platform that embeds interactive video, voice, messaging, and screen sharing into web and mobile apps. The OpenTok platform includes client libraries for web and native clients (iOS, Android), server-side SDKs and a REST API. 

The OpenTok.js integration to was built by and the code documentation is available on GitHub.

Integration steps

Serve the callstats-opentok-shim from your website or from’s CDN, add file on your page after the callstats.js script. Please make sure to add them ahead of tokbox js

<script src=""></script>
<script src=""></script>
<script src=""></script>

Then, initialize like shown below:


Currently, the shim supports AppID, AppSecret, and SessionID. So, for example:

  AppId: 834738451,
  AppSecret: 'sOTjsJEfwPUGW4SRJI4BhbprGJ3lfO6Kp+:ixCX1P9mzNThlsW+YNLlb=',
  SessionId: '1_eiTh54cMjNx4FNk-JkT15IXNTGtNnh8W03m0RwYTMxUMNMDyhU2gzMxezMXjaF0Mj0E-UH4'