Suggestions

close search

Back to Basic Video Chat Overview

Basic Video Chat Step 2: Creating a session and defining archive REST API calls

  1. 1
    Basic Video Chat Step 1:
    Setting up the test web service
  2. 2
    Basic Video Chat Step 2:
    Configuring and testing the app
  3. 3
    Basic Video Chat Step 3:
    Initializing an OpenTok session
  4. 4
    Basic Video Chat Step 4:
    Connecting to the session
  5. 5
    Basic Video Chat Step 5:
    Publishing a stream to the session
  6. 6
    Basic Video Chat Step 6:
    Subscribing to audio-video streams
  7. 7
    Basic Video Chat Step 7:
    Customizing the UI

Before you can test the application, you need to set up a web service to handle some OpenTok-related API calls. The web service securely creates an OpenTok session.

The Learning OpenTok PHP repo includes code for setting up a web service that handles the following API calls:

The HTTP GET request to the /session endpoint returns a response that includes the OpenTok session ID and token.

Download the repo and run its code on a PHP-enabled web server. You can also deploy and run the code on Heroku (so you don't have to set up your own PHP server). See the readme file in the learning-opentok-php repo for instructions.

  1. 1
    Basic Video Chat Step 1:
    Setting up the test web service
  2. 2
    Basic Video Chat Step 2:
    Configuring and testing the app
  3. 3
    Basic Video Chat Step 3:
    Initializing an OpenTok session
  4. 4
    Basic Video Chat Step 4:
    Connecting to the session
  5. 5
    Basic Video Chat Step 5:
    Publishing a stream to the session
  6. 6
    Basic Video Chat Step 6:
    Subscribing to audio-video streams
  7. 7
    Basic Video Chat Step 7:
    Customizing the UI