Meeting Room Management
This guide will show you how to:
- Retrieve the details for an individual room.
- Get a list of all the rooms associated with your application.
- Change the expiration date for an individual long term room.
Individual Room Retrieval
https://api-eu.vonage.com/v1/meetings/rooms/:room_id
When you create a room, you will get a room id in the response. This id can be used for room retrieval using a
Example Request
const credentials = new Auth({
privateKey: VONAGE_APPLICATION_PRIVATE_KEY_PATH,
applicationId: VONAGE_APPLICATION_ID,
});
const options = {};
const meetingsClient = new Meetings(credentials, options);
const room = await meetingsClient.getRoom("9f6fe8ae-3458-4a72-b532-8276d5533e97");
var client = VonageClient.builder()
.applicationId(VONAGE_APPLICATION_ID)
.privateKeyPath(VONAGE_PRIVATE_KEY_PATH)
.build();
var room = client.getMeetingsClient().getRoom(
UUID.fromString("9f6fe8ae-3458-4a72-b532-8276d5533e97")
);
client = Vonage::Client.new(
application_id: ENV["VONAGE_APPLICATION_ID"],
private_key: File.read(ENV["VONAGE_APPLICATION_PRIVATE_KEY_PATH"])
)
room = client.meetings.rooms.info(room_id: "49d900c8-372b-4c9e-b682-5601cbdc1f7a")
This will return a generic Vonage::Response object.
The Vonage::Response object de-serializes the returned JSON data into Vonage::Entity objects, and provides getter methods for the top level properties of that JSON data, for example:
room.display_name # => "Room 1"
room.type # => "instant"
For properties in the JSON data where the value is a JSON object, this is itself de-serialized into a Vonage::Entity object, with its own getter methods. For example, the recording_options getter returns a Vonage::Entity object with auto_record and record_only_owner getters. You can chain these getter method invocations to get to the data you need:
room.recording_options.auto_record # => false
The response will be identical whether the room is long term or instant.
Example Response
Retrieve all Rooms
https://api-eu.vonage.com/v1/meetings/rooms/
To retrieve all rooms, send a
id: Example Request
const credentials = new Auth({
privateKey: VONAGE_APPLICATION_PRIVATE_KEY_PATH,
applicationId: VONAGE_APPLICATION_ID,
});
const options = {};
const meetingsClient = new Meetings(credentials, options);
const rooms = meetingsClient.getRooms();
var client = VonageClient.builder()
.applicationId(VONAGE_APPLICATION_ID)
.privateKeyPath(VONAGE_PRIVATE_KEY_PATH)
.build();
var rooms = client.getMeetingsClient().listRooms();
client = Vonage::Client.new(
application_id: ENV["VONAGE_APPLICATION_ID"],
private_key: File.read(ENV["VONAGE_APPLICATION_PRIVATE_KEY_PATH"])
)
rooms_list = client.meetings.rooms.list
This will return an object of the Vonage::Meetings::Rooms::ListResponse class.
This class defines an each method, allowing you to iterate through the _embedded array returned in ther response. For example:
rooms_list.each {|room| puts room.display_name}
# => "Room One"
# => "Room Two"
The class also includes Enumerable, so you can call any instance method from that module on the object. For example:
instant_rooms = rooms_list.select {|room| room.type == "instant"}
Example Response
Expiration Update
PATCH: https://api-eu.vonage.com/v1/meetings/rooms/
The expiration date of a long term room can be updated by using a PATCH action and the room id. The new date should be included in an object called update_details:
Example Request
const credentials = new Auth({
privateKey: VONAGE_APPLICATION_PRIVATE_KEY_PATH,
applicationId: VONAGE_APPLICATION_ID,
});
const options = {};
const meetingsClient = new Meetings(credentials, options);
const room = await meetingsClient.getRoom("9f6fe8ae-3458-4a72-b532-8276d5533e97");
room.expiresAt = '2022-11-11T16:00:00.000Z';
await meetingsClient.updateRoom("9f6fe8ae-3458-4a72-b532-8276d5533e97", room);
var client = VonageClient.builder()
.applicationId(VONAGE_APPLICATION_ID)
.privateKeyPath(VONAGE_PRIVATE_KEY_PATH)
.build();
var room = client.getMeetingsClient().updateRoom(
UUID.fromString("9f6fe8ae-3458-4a72-b532-8276d5533e97"),
UpdateRoomRequest.builder()
.expiresAt(Instant.parse("2022-11-11T16:00:00.000Z"))
.build()
);
client = Vonage::Client.new(
application_id: ENV["VONAGE_APPLICATION_ID"],
private_key: File.read(ENV["VONAGE_APPLICATION_PRIVATE_KEY_PATH"])
)
room = client.meetings.rooms.update(
room_id: "9f6fe8ae-3458-4a72-b532-8276d5533e97",
expires_at: "2023-11-11T16:00:00.000Z"
)
Please note that only long term rooms can be updated.