Create a Session with Video API

The Vonage Video API lets you embed real-time, browser-based audio and video into your applications. This guide walks you through setting up the Video API in the Vonage API Dashboard and building a simple one-to-one video chat — no server required.

Work with video

Prerequisites

Before you begin, make sure you have:

  • A Vonage API account if you don't have one
  • Chrome or Firefox — the Video API supports several browsers, but we recommend these for this guide
  • A webcam and microphone — your browser will ask for access when you run the demo

Create a Video Application

A Video application in the Dashboard holds your credentials and configuration for the Video API.

Create an application
  1. Log in to the Vonage API Dashboard
  2. Navigate to Applications in the left sidebar
  3. Click Create a new application
  4. Enter a name for your application (e.g. My Video App)
  5. Under Capabilities, toggle on Video
  6. Click Generate new application

Your application is created with a unique Application ID. Keep this page open — you'll need it in the next step.

Build Your First Video Session

With your credentials ready, you can build a simple browser-based video chat. Complete all of the steps in the UI.

Prerequisites

For demo purposes use either Chrome or Firefox. Make sure you have access to microphone and a webcam.

create a video session

Authentication

Authentication initializes your app by adding an application ID, session ID, and token, enabling secure connection to a Vonage Video API session.

Authentication

Connect to the Session and Create a Publisher

It involves initializing a session and setting up a video publisher. This allows your application to connect to the Vonage Video API session and stream video/audio from your webcam and microphone, enabling real-time communication.

Connect to the session

Publish the Publisher

This step involves sharing your video and audio stream with the session so others can see and hear you.

Publish the publisher

Create a Subscriber

Creating a subscriber involves adding code to your app that allows it to receive and display the video stream from the publisher.

Create a subscriber

Add a Second Video Publisher to Create a One-to-One Video Chat

To test the one-on-one video chat, mute your computer's speaker to avoid audio feedback, then click the button to open a second client in a new browser tab (using Codepen). This will create another video publisher, and you'll see both video streams on the page.

Add a second video publisher

What's Next?

Now that you've built your first video session, explore more of what the Video API can do: