Frequently Asked Questions

1Getting started

Where do I find documentation?

All the information you need to get started is located here. We have comprehensive documentation, but you might want to start with our Hello World tutorial.

What is an API key, and why do I need one?

You'll need an API key to access our development environment and start building your application. Your API key is unique and private.

What is the difference between the server-side API and the client-side API?

The client-side API is a JavaScript library that gives you control over how you size, place, move, and connect video streams within your application. For Flash developers, we also provide a client-side ActionScript library. The server-side API is a library in your programming language of choice that you can use to generate tokens and sessions IDs programmatically in a way that talks to your app.

Why doesn't the sample code work from my desktop?

If you are running the HTML page from your desktop as a "file://" URL, what is happening is that Flash is putting up a security wall in order to prevent "cross-domain" communication from taking place. If you step through the code, you will likely see that session.connect() never returns.

This problem only occurs when you run the file from your desktop using the "file://" URL. If you use a local server (ie. a localhost URL), the problem will go away. If you serve the file from a web server, the problem will go away.

To enable the page to work directly from the desktop using a "file://" prefix, you need to change Flash's security settings. You can do this using a page online that Adobe provides:

  1. Go to this web page: http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html
  2. Wait patiently while the Flash app initializes (it can take a while)
  3. Select "Add location" from the "Edit locations..." pull down menu
  4. Either specify the individual file location of the HTML page, or the file folder in which it is located (to make sure any other app pages you might have in the same directory also work).

You should find that the HTML page starts working after this.

2Technical specs

I am having trouble using OpenTok. What should I do?

Quickly go through our user diagnostic tool so we can make sure that your hardware, software, and Internet are all up to par to use the OpenTok platform.

I am having trouble using OpenTok with Mac OS X Lion. What should I do?

Make sure that you have installed the latest version of Flash Player. There were some issues in previous versions on Mac OS X Lion.

What are the technical requirements for end users using OpenTok?

For OpenTok 1.0, end users will need the following:

  • Flash Player 11.0 or later
  • Firefox 14.0+, Safari 5.0+, Internet Explorer 9+, the most up to date version of Chrome
  • Windows 7+, OSX 10.6+
  • A webcam and a microphone!
  • A standard DSL line with a minimum upload and download speed of 250kb per call participant

For OpenTok 2.0 requirements, see "WebRTC" below.

Does this work on mobile devices / iPads?

Yes! We have launched our new iOS SDKs, and are excited to see what you will build with them.

3Features

What's the baseline video / audio quality?

The quality varies based on users' connectivity.

What are the security and privacy features?

As a developer, you generate an authentication token with the server-side APIs. You use this token when connecting to an OpenTok session. For sessions, TokBox protects privacy by generating a unique session ID—a randomized string of up to 255 alphanumeric characters—for each video chat session. Also, with OpenTok the developer can build functionality to remove unwanted participants.

I'm looking for [xyz] feature — can you build it? When?

If you don't see something you want or need, please contact us a .

How much does this cost?

We want lots of people to use OpenTok and are offering the basic live streaming for free. For more information see our pricing page

4Developer troubleshooting

My app isn't responding. What can I do?

Try the following:

  • Call the OT.setLogLevel() to send debug messages to the console.
  • Add an event listener for exception events by calling the OT.on() method.

See the API reference documentation for the TB class.

Developers using the OpenTok JavaScript library should use a HTML debug console, such as Firebug (for Firefox) or the Google Chrome Debugger.

Why is my app working erratically in IE8?

In Internet Explorer 8, links with href targets that invoke JavaScript actions cause a window.onbeforeunload event to be thrown. This event causes OpenTok to unload all components and disconnect from all sessions. Consequently, clicking on these kinds of links can unexpectedly disconnect OpenTok sessions, resulting in seemingly erratic behavior. In order to work around this problem, ensure that links with JavaScript actions are written as <a href="#" onclick="javascript:startPublishing();">Action</a> rather than as <a href="javascript:startPublishing();">Action</a>.

Why can I sometimes not click to allow my camera on Mac Firefox?

In some combinations of Flash versions and browsers, the Allow button in the Adobe Settings Panel cannot be clicked. The issue may occur when you center a Flash SWF or if you position the SWF relatively such that its x and y coordinates are not integers. As a workaround, add 0.5px to the margin-left of the SWF if the width of the window is odd; this is to make the x,y coordinates an integer. This doesn't work in every case, though.

I'm now generating session IDs. Why can't one page subscribe to videos published in other pages?

For users to see each others’ audio/video streams, they need to connect to the same session (using the same session ID). Each OpenTok session is a collection of audio/video streams that can communicate with one another. To have users see each other's streams, do not generate unique session IDs for each user. Reuse the same session ID for each page in the session, and pass that session ID to the OT.initSession() method. (You do, however, generate unique connection tokens for each user.)

Why is a Publisher or Subscriber destroyed when I set the CSS style of container DIV to display:none?

This is a known issue in Firefox and Chrome (see Mozilla bug 90268).

Why is the container DIV destroyed when I publish or subscribe?

This is the correct behavior for the OpenTok JavaScript API. By default, the element you pass into the Session.publish() or Session.subscribe() method is an HTML DOM element to be replaced. It is not a container element. You can override this default behavior by setting the insertionMode property of the properties parameter you pass into the Session.publish() or Session.subscribe() method.

Do you support HTTPS?

The OpenTok JavaScript library supports HTTPS. If your page loads via HTTPS, be sure to load the OpenTok JavaScript library via HTTPS (otherwise the browser will display a warning to the user):

  • <script src="https://static.opentok.com/v0.91/js/TB.min.js" ></script>

(Note, however, that OpenTok video streams are not sent on a secure socket.)

Why is WebRTC is not working properly in Internet Explorer?

Microsoft has not fully implemented the WebRTC standard.

How do I properly resubscribe to video when the network causes a connection to fail over to audio only?

When OpenTok detects network issues that impede the quality of an end-user's experience, OpenTok will automatically drop the video stream to an end point until such time as they can recover. This condition is made evident by the video being replaced by a microphone icon. When this happens, clients do not in addition need to explicitly unsubscribe from the video stream. When network conditions improve, OpenTok will automatically resubscribe users to the video stream.

When will my video stream fail over to audio only?

When OpenTok detects the following network conditions on a given connection, it will automatically turn off the video stream to assist in providing the best possible experience to an end-user:

  • Less than 65kbps
  • Greater than 20% packet loss

5Account Management

How do I sign up for an OpenTok account?

You can sign up for an OpenTok account through our dashboard. After you have signed up, check out our Quick Start Guide to get started.

I forgot my password. What do I do now?

Use our Forgot Password flow to reset your password.

Do I need separate accounts for the forum and the OpenTok dashboard?

No. Your OpenTok account works across both the forums and the dashboard.

I had a partner key before the OpenTok dashboard. Will it still work?

Yes. You should have received a migration email to help you get started. If you did not, please email us at support@tokbox.com , and we will help get you set up.

6Billing

Do I need a credit card on file to use OpenTok?

No, you don’t need a credit card on file to get started with OpenTok.

What credit cards do you accept?

We accept any Visa, MasterCard, American Express, JCB, Discover, or Diners Club cards.

If I don’t have a credit card on file, will I be able to archive?

Yes, while archiving is in beta you will be able to archive without a credit card on file. Once archiving exits beta, you will need to add a credit card to your account to continue using it.

How do I add or update my credit card?

Login to the OpenTok dashboard to update your credit card.

When does my billing cycle begin?

Your billing cycle begins on the day of the month on which you sign up for either a paid minutes plan or premium support.

How often will I be charged?

You will be charged monthly on the day of the month in which you originally signed up. For example, if you signed up January 15th, you will be charged on February 15th and every 15th of the month afterwards.

7Premium Support

I just signed up for premium support. What do I do now?

You’re all set! If you need help with your OpenTok-powered application, then email us at support@tokbox.com, and we’ll get back to you within one business day.

What does the OpenTok SLA get me?

Please review our SLA document to get the full details about how the OpenTok SLA works, what constitutes downtime, and how to get credit if you experience downtime.

How does next-day email response work?

The email address associated with your OpenTok account will be flagged as a premium support partner in our support queue. Your inquiries will be prioritized and responded to faster.

How will I be notified of changes that may break my application?

If we are making a critical change to the OpenTok API that may cause your application to break, you will be notified by email at the address associated with your OpenTok account.

How can I submit bugs?

Please submit a bug to support@tokbox.com. Make sure to use the email associated with your OpenTok account so that we can identify you as a premium support partner.

8Pricing

What does TokBox charge for?

For usage, we’re charging for “streamed minutes” - see definition below. We’re also charging for consulting services and support packages.

What is a streamed minute?

When you use OpenTok to power a video session for your website or application, your end-users see live video streams of the other participants in that session. Each of these videos (which stream from our platform to your end-users) is a media stream. Each user in a four-way call, for example, receives three media streams. TokBox charges you for each media stream, per minute.

What are the 10M messages and what can I do with them?

In September, we exposed our signaling API to developers. This will allow developers to send messages across clients in their applications. These messages allow developers to build basic text chat, send instructions from one client to another, and create other valuable experiences. 10 million messages are included in the minimum monthly fee, which should be more than enough for all of our customers. If you need more, however, then you will be charged $1 per 1 million additional messages. We will only count messages SENT from our server.

What is included in my 30 day free trial?

At TokBox we encourage all of our customers to try the OpenTok platform before they purchase. Our 30 free day trial gives you full access to all of the platform features you need to bring live video to your website or mobile application. If you need help during your trial, feel free to use our support options under the free Basic Support Plan.

Can I do multiple projects or applications during my free 30 day trial?

Yes. Note, however, that we limit you to one OpenTok Dashboard per registered email address. Please contact us for special trial requests.

What happens if I need an extended trial period?

Please contact us for special trial requests.

What kind of support will I receive during my trial?

You have access to our free Basic Support Plan.

What if I need special support services during my trial?

Please contact us for special support requests.

Can I push my OpenTok-powered app to production/live during trial?

No. Trial implementations are for non-commercial internal demonstration and evaluation purposes only. For complete terms and conditions please read the OpenTok Terms of Service.

What if I want to go live during my 30 day trial period?

You can go live within the first 30 days, however you’ll need to input your credit card information in your OpenTok Dashboard. Billing will begin upon expiration of the trial.

Do I need to enter a credit card to get started with my trial?

No. You do not need to enter a credit card for a trial, but you will need to input credit card information or arrange for invoicing if you wish to continue using the OpenTok platform beyond your trial period without interruption.

Can I pay by invoice instead of by credit card?

Yes. We will generate invoices upon request for amounts over $100 per month. Please contact bizdev@tokbox.com.

How do I estimate my OpenTok monthly usage?

To estimate your OpenTok usage, you will need the following information:

  • Number of users that will be receiving video
  • Number of video streams that each user will be receiving
  • Length of call

Then to compute total streamed minutes, use the following formula:

(# of video streams sent down from the OpenTok platform to the participants in a call) X (# of minutes in call) = Total streamed minutes

For example:

  1. You have 4 users receiving video within a call.
  2. Each of those users will receive the video stream of the other 3 participants. You do not receive video from yourself.
  3. The call lasts for 25 minutes
  4. 4 participants X 3 streams each X 25 minutes = 300 streamed minutes

Why can I no longer create API keys?

Effective October 1, 2013, TokBox is changing the pricing model of the OpenTok platform. If you created an OpenTok project before August 29, 2013, we are grandfathering the old pricing for your projects. As a result, you can no longer generate API keys from that pre-existing account. Starting on October 1, if you would like to create a new OpenTok project or generate an API key, you need to open a new OpenTok account which will be subject to our new pricing structure.

How can I upgrade my account to take advantage of the new pricing offering?

In an upcoming release, users will be allowed to upgrade their existing account to the new version of our dashboard. Users should be aware that upgrading an existing account which was grandfathered, will result in modifications to your billing and metering plan, which may affect your monthly bill.

9WebRTC

What is OpenTok on WebRTC?

Web Real-Time Communication (WebRTC) is a new HTML5 standard framework that enables the sharing of video, audio, and data directly between web browsers. OpenTok on WebRTC is a video chat API that implements WebRTC.

Do my users need to download anything in order to use OpenTok on WebRTC?

No, WebRTC is a web standard which means no installations or downloads are required. Your users will need to have a compatible browser.

Why would I use OpenTok on WebRTC instead of building my own WebRTC implementation?

OpenTok is a layer on top of WebRTC that simplifies development by providing a set of APIs that handle common tasks associated with video chat applications. OpenTok on WebRTC enables you to take advantage of WebRTC with complementary APIs that handle session initiation, signaling, cross-platform interop (iOS and web), and more.

How many people do OpenTok on WebRTC video calls support?

TokBox has just introduced the Mantis beta program. Mantis acts as a central switching station for non-peer-to-peer WebRTC streams. Mantis enables:

  • High-quality multi-party video calls
  • Reduced upload bandwidth consumption, with the ability to scale out a single WebRTC steam to many endpoints
  • Cross-browser compatibility for Chrome and Firefox
  • Interop with iOS apps built using the OpenTok on WebRTC iOS SDK version 2.1.2.

For more information, see the OpenTok blog. If you are interested participating in the beta, please contact us at bizdev@tokbox.com.

What browsers currently support WebRTC?

OpenTok 2.0 (WebRTC) is supported in the following browsers:

  • Google Chrome (latest release version)
  • Google Chrome for Android (latest release version)
  • Firefox (latest release version)

Does OpenTok on WebRTC work with iOS?

Yes! Get the library here.

Does OpenTok on WebRTC work with Android?

Our WebRTC Client Library for Android is currently in beta.

Is there interop between OpenTok and OpenTok on WebRTC?

No.

Are OpenTok and OpenTok on WebRTC priced the same?

Yes, both stacks have the same pricing.

What are the port requirements for WebRTC?

WebRTC uses UDP protocol, which means for WebRTC to work, your UDP ports must be open. These ports are usually open unless you are behind a firewall.

Clients using Google Chrome can use the OpenTok Diagnostic app to determine if they can connect to an OpenTok on WebRTC application.

9Security

Is voice and video traffic encrypted in an OpenTok on WebRTC session?

Yes, all media traffic is encrypted regardless of the endpoint you use (web or mobile) or the session setup you choose (P2P or multiparty). As a result, your session will be secure even if use OpenTok over an open public hotspot.

Is OpenTok security solution based on a proprietary solution?

No, we don’t believe in proprietary solutions when we talk about security. OpenTok is fully based on proven standards, written by industry experts, and used for years in commercial products. The core protocols providing WebRTC OpenTok security are SRTP for media traffic encryption, and DTLS-SRTP for key negotiation, which are defined by the IETF.

What encryption algorithms do you use, and what is the strength of the keys used?

OpenTok WebRTC-compatible endpoints use the AES cipher with 128-bit keys to encrypt audio and video, and HMAC-SHA1 to verify data integrity.

What keys are being used for the encryption?

Endpoints automatically generate random keys at the beginning of each. To increase security even further, additional keys are generated periodically throughout the session.

Does OpenTok's security solution require any interaction with the user?

No, everything happens under the hood without any interaction with the user.

Does securing my OpenTok-based application require me to change my implementation?

No, the OpenTok API is the same and requires no change to your code.

Does securing my application have any impact on bandwidth and/or video quality?

Yes, it does, but very minimially. It increases the length of each audio and video packet by 8 bytes, but that is less than 1% of the typical bitrate of a OpenTok session. Regarding the delay, the SRTP encryption framework was designed specifically for real-time applications, and the impact is rarely noticeable.

Does securing my application impact CPU or battery consumption?

Yes, but the cost of encryption is minimal when compared to the cost of encoding and decoding the audio and video.

For any other questions, please post to our forums.
To report a bug, please email .

IRC Live Chat

Have a quick question? Chat with TokBox Support on IRC. Join chat