In order to run an OpenTok application in the browser, it needs to obtain an OpenTok session ID. To do this, you will need to create a web service that uses one of the OpenTok server-side SDKs.
In this basic tutorial, we've created this for you using the OpenTok PHP SDK. The Learning OpenTok PHP repo includes code for setting up this web service. You should walk through how the service works upon completing this tutorial.
For now, you can quickly deploy the service on Heroku by clicking on the purple button below. Heroku is a PaaS (Platform as a Service) that can be used to deploy simple and small applications for free. You will be prompted to create an account if you don't already have one.
Heroku will prompt you to add your OpenTok API key and secret. Log in to your TokBox Account and find them on the Project Page.
The Learning OpenTok PHP web service handles the following API calls:
If you prefer to run this on your own PHP server. See the Learning OpenTok PHP repo.
Next up, you will learn about tokens and how they secure access to your video chat.