Create & Customize Meetings

The Meetings API allows you to integrate real-time, high-quality interactive video meetings into your web apps. Ideal for those who want plug and play meetings with limited customization, it takes only a few lines of code to generate a meeting and embed it into your application.

In this use case, you will put together a cURL request to create a customized meeting room for your application.

To achieve this, we will review the options available when creating a meeting:

  1. Create a basic request - start with a cURL request for a basic meeting room.
  2. Set join approval settings - Set the level of approval required to join the meeting.
  3. Localization - Select the language you want to show in the UI.
  4. Choose the features you want to enable - Enable / disable options for recording, chat, and the whiteboard.
  5. Change the theme of your meeting - Apply a custom theme, if required.
  6. Run the request - create the meeting! At this point, the meeting is ready to use, but you can also follow the next step to embed your meeting.
  7. Embed the meeting in your application - create an iFrame to embed your meeting into your website or application.

Prerequisites

To complete the tutorial, you need:

  • Vonage Developer Account: If you do not already have one, sign-up for a free account on the Vonage Developers Account.

  • Application ID and Secret: Once you’re logged in to the Vonage API Dashboard, click on Applications and create a new Application. Click Generate public and private key and record the private key. You'll be using the private key with the Application ID to Generate a JSON Web Token (JWT). For further details about JWTs, please see Authentication. Also ensure that the Meetings API is enabled for your application under 'Capabilities' and enter your webhook URLs:

Enable the Meetings API for your application using the dashboard

Create a basic request

To begin, the following cURL request can be used to create a basic meeting room with the default options:

The following sections detail the settings that can be used to customize your meeting room.

Set join approval settings

join_approval_level can be used to set the level of approval needed to join the meeting. It must be set to one of the following:

  • after_owner_only - Participants will join the meeting only after the host has joined.
  • explicit_approval - Participants will join the waiting room, and the host will approve / deny them.
  • none - No approval needed.

For example, you may want to set the meeting room so that participants are held in a waiting room until the owner approves entry. To do so, add join_approval_level to the request as follows:

Localization

The language of the UI can be changed in two ways:

  1. Predefined in the API Call - this allows the language to be predefined for all participants in the meeting via an option in the API call.
  2. Selection from the UI - this adds a language selection option to the UI allowing each participant in the meeting to select their preferred language.

In this tutorial we'll use the API call to apply a language to all participants; see the guide on Localization for more information on the UI switcher.

To set a language, add a ui_settings to your API call containing your chosen language. In this example, we'll apply English but you can use any of the supported languages:

Choose the features you want to enable

There are several features that can be enabled or disabled for your meetings:

  • Recording: Shows the recording option in the UI for the meeting. Set using is_recording_available.
  • Whiteboard: Shows the option to turn on the whiteboard. Set using is_whiteboard_available.
  • Chat: Enables the chat function. Set using is_chat_available.

In this example we'll enable each of these features by adding the available_features object to the API call:

Change the theme of your meeting

Meetings can be customized with themes to use different colors, logos, or texts. First, you'll need to create a theme by following the guide here - once created, you'll receive a theme_id you can use to apply the theme while creating a meeting:

Run the request

With all of your customizations configured, it's time to run the request. You will receive a callback containing all of the information for your meeting, including your meeting ID and the URLs required to join as both a host and guest:

At this point, the meeting is ready to use! The next steps cover some additional parameters that can be added to the URLs of your meeting, along with instructions for embedding your meeting into a website or application.

URL Parameters

You can also add some optional parameters to the URLs of your meeting to enable/disable different functionality:

ParameterEffectValues
skip_prejoinDetermines if a user sees the pre-join screen or enters the meeting directly.true or false
user_display_nameDefines the name a participant has in the meeting.Text
blur_onBackground blur is automatically switched on when entering the meeting.true or false
blur_enabledIf this is disabled, participants in the meeting cannot switch blur background on or off - the button is removed from the UI of the meeting.true or false
background_enabledIf this is disabled, participants in the meeting cannot change their background - the button is removed from the UI of the meeting.true or false
layoutSets a default layout for the meeting.gallery: shows all available screens. A meeting in the Gallery configuration
audience: shows the main presenter (speaker or shared screen) in the middle, with all other participants on the right. A meeting in the Gallery configuration
dominant: Only shows the main presenter (speaker or shared screen). A meeting in the Gallery configuration

Host URL

To add to a Host URL, add your parameters after the ? - for example, to use the Audience layout and skip the pre-join screen with this URL:

https://meetings.vonage.com/?room_token=280674154&participant_token=eyJhbGciOiJIUzI1NiIsInR5cC

You would add the following parameters:

https://meetings.vonage.com/?room_token=280674154&participant_token=eyJhbGciOiJIUzI1NiIsInR5cC&skip_prejoin=true&layout=audience

Guest URL

To use these parameters with the guest_url returned in your callback, you must add ?room_token= before the room ID.

For example, https://meetings.vonage.com/280674154 would become https://meetings.vonage.com/?room_token=280674154. You can then add other parameters to the list as needed.

Embed the meeting in your application

An iFrame can be used to embed your meeting into your website or application. Replace GUEST_URL in the following code with your meeting URL:

This will insert your meeting into your application, and prompt the user for camera and microphone permissions. There are some limitations on features available depending on the size of your iFrame, which are detailed here.

You will also need to send an email request to the Meetings API team to whitelabel the domain of the website the iFrame is used in.

Conclusion

In this tutorial, you created a meeting using the Meetings API, customized to your needs. For more information on the Meetings API, including Meeting Room Management and information on Callbacks, see Further Reading below.

Further Reading