Set up an Instant Meeting Room

How to set up an Instant (default) room using the Meetings API.

Prerequisites

Set up POST Request

POST Endpoint: The endpoint for creating a meeting room is: https://api-eu.vonage.com/beta/meetings/rooms.

Required Headers: You need to add the Content-Type to your headers: Content-Type: application/json.

Authorization: Use the JWT Generator to create a JWT from the Application ID and private key of the application. You'll use your JWT to create a Token Authorization string that is made up of Bearer and the JWT you created.

Body Content

The following fields can be assigned values in the POST request:

Field Required? Description
display_name Yes The name of the meeting room.
metadata No Metadata that will be included in all callbacks.
type No The type of meeting which can be instant (the default) or long term.
recording_options No An object containing recording options for the meeting. For example:
If auto_record=true, the session will be recorded. If false, the session will not be recorded.
If record_only_owner=true, all audio in the session will be recorded but only the video of the owner of the room will be recorded. If false, all users in the session will be recorded.

Request

You can use the following code to start an instant room (default options):


   curl -X POST 'https://api-eu.vonage.com/beta/meetings/rooms' \
   -H 'Authorization: Bearer XXXXX' \
   -H 'content-type: application/json' \
   -d '{
   "display_name":"New Meeting Room"
               }'

To create an instant room, automatically record and only record the owner of the room:

   curl -X POST 'https://api-eu.vonage.com/beta/meetings/rooms' \
   -H 'Authorization: Bearer XXXXX' \
   -H 'Content-Type: application/json' \
   -d '{
   "display_name":"New Meeting Room",
   "recording_options": {
       "auto_record": true,
       "record_only_owner": true}
               }'

Response

When an instant room is created the expiration date is set to 10 minutes.

As this room has not yet expired, is_available is set to true.

If you set either auto_record or record_only_owner to true in your request, this option will be shown as true in the code below.

{
   "id":"a66e451f-794c-460a-b95a-cd60f5dbdc1a",
   "display_name":"New Meeting Room",
   "metadata":null,
   "type":"instant",
   "expires_at":"2021-10-19T17:54:17.219Z",
   "recording_options":{
      "auto_record":true,
      "record_only_owner":true
   },
   "meeting_code":"982515622",
   "_links":{
      "host_url":{
         "href":"https://meetings.vonage.com/?room_token=982515622&participant_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IjYyNjdkNGE5LTlmMTctNGVkYi05MzBmLTJlY2FmMThjODdj3BK7.eyJwYXJ0aWNpcGFudElkIjoiODNjNjQxNTQtYWJjOC00NTBkLTk1MmYtY2U4MWRmYWZiZDNkIiwiaWF0IjoxNjM0NjY1NDU3fQ.PmNtAWw5o4QtGiyQB0QVeq_qcl6fs0buGMx5t4Fy43c"
      },
      "guest_url":{
         "href":"https://meetings.vonage.com/982515622"
      }
   },
   "created_at":"2021-10-19T17:44:17.220Z",
   "is_available":true
}

Your Instant Room has been created. Note the ID if you are going to further configure this room.