Etiquetado blanco: Gestión temática de salas de reuniones
Utilice la Meetings API para crear temas personalizados con diferentes colores, logotipos y texto. Los temas pueden aplicarse a una sala, a unas cuantas salas o a todas las salas de reuniones de su aplicación.
Requisitos previos
Cuenta de desarrollador de Vonage: Si aún no tiene una, regístrese para obtener una Account gratuita en el Cuenta de desarrollador de Vonage.
Identificación y secreto de la solicitud: Una vez iniciada la sesión en Panel de API de VonageHaga clic en Applications y cree una nueva Application. Haga clic en
Generate public and private keyy registre la clave privada. Utilizará la clave privada con el ID de la aplicación para Generar un token web JSON (JWT). Para más información sobre los JWT, consulte Autenticación. Asegúrese también de que la Meetings API está activada para su aplicación en "Capacidades":

Crear un tema
https://api-eu.vonage.com/v1/meetings/themes
Contenido
Se pueden asignar valores a los siguientes campos en la solicitud POST:
| Campo | ¿Es necesario? | Descripción |
|---|---|---|
theme_name | No | El nombre del tema (debe ser único). Si es nulo, se generará automáticamente un UUID. |
main_color | Sí | El color principal que se utilizará para la sala de reuniones. |
brand_text | Sí | El texto que aparecerá en la página de inicio de la reunión, en caso de que no haya imagen de marca. |
short_company_url | No | La URL que representará a cada sala de reuniones con este tema (debe ser única). |
Ejemplo de solicitud
El siguiente ejemplo creará un tema con el naranja como color principal y un texto para mostrar de "Naranja". El nombre del tema se utiliza internamente y debe ser único para cada tema.
const credentials = new Auth({
privateKey: VONAGE_APPLICATION_PRIVATE_KEY_PATH,
applicationId: VONAGE_APPLICATION_ID,
});
const options = {};
const meetingsClient = new Meetings(credentials, options);
await meetingsClient.createTheme({
themeName: "orange-room",
mainColor: '#ff6500',
brand: "Orange",
});
var client = VonageClient.builder()
.applicationId(VONAGE_APPLICATION_ID)
.privateKeyPath(VONAGE_PRIVATE_KEY_PATH)
.build();
var theme = Theme.builder()
.mainColor("#ff6500")
.brandText("Orange")
.themeName("orange-room")
.build();
client.getMeetingsClient().createTheme(theme);
var credentials = Credentials.FromAppIdAndPrivateKeyPath(applicationId, privateKeyPath);
var client = new VonageClient(credentials);
var request = CreateThemeRequest.Build()
.WithBrand("Orange")
.WithColor(Color.FromName("#ff6500"))
.WithName("orange-room")
.Create();
var response = await client.MeetingsClient.CreateThemeAsync(request);
$keypair = new Vonage\Client\Keypair(
VONAGE_APPLICATION_PRIVATE_KEY_PATH
VONAGE_APPLICATION_ID,
);
$client = new Vonage\Client($keypair);
$applicationTheme = $client->meetings()->createTheme('orange-room');
$applicationTheme = $client->meetings()->updateTheme($applicationTheme->theme_id, [
'update_details' => [
'brand_text' => 'Orange',
'main_color' => '#ff6500'
]
]);
client = vonage.Client(
application_id=VONAGE_APPLICATION_ID,
private_key=VONAGE_APPLICATION_PRIVATE_KEY_PATH,
)
response = client.meetings.create_theme(
{
'main_color': '#ff6500',
'brand_text': 'Orange',
'theme_name': 'orange-room',
}
)
Ejemplo de respuesta
{
"theme_id": "49d900c8-372b-4c9e-b682-5601cbdc1f7a",
"theme_name": "orange-room",
"domain": "VCP",
"account_id": "123ab4cd",
"application_id": "921a6f5b-1f94-49f4-8107-26f0c75fc6e7",
"main_color": "#ff6500",
"short_company_url": null,
"brand_text": "Orange",
"brand_image_colored": null,
"brand_image_white": null,
"branded_favicon": null,
"brand_image_white_url": null,
"brand_image_colored_url": null,
"branded_favicon_url": null
}
Tenga en cuenta que los valores nulos representan imágenes temáticas que pueden añadirse mediante la función proceso de gestión de imágenes. Las URL que se generarán una vez cargadas esas imágenes.
Actualizar un tema
PATCH: https://api-eu.vonage.com/v1/meetings/themes/:theme_id
Las propiedades del tema que pueden actualizarse son las mismas que las que pueden establecerse en crear. Todas las imágenes deben añadirse a través de proceso de gestión de imágenes.
Para actualizar las propiedades, necesitará la función theme_id y un objeto llamado update_details:
Ejemplo de solicitud
const credentials = new Auth({
privateKey: VONAGE_APPLICATION_PRIVATE_KEY_PATH,
applicationId: VONAGE_APPLICATION_ID,
});
const options = {};
const meetingsClient = new Meetings(credentials, options);
const theme = await meetingsClient.getTheme("86da462e-fac4-4f46-87ed-63eafc81be48");
theme.mainColor = '#12f64e';
theme.brand = 'Brand';
theme.shortCompanyUrl = "short-url";
await meetingsClient.updateTheme("86da462e-fac4-4f46-87ed-63eafc81be48", theme);
var client = VonageClient.builder()
.applicationId(VONAGE_APPLICATION_ID)
.privateKeyPath(VONAGE_PRIVATE_KEY_PATH)
.build();
var theme = client.getMeetingsClient().updateTheme(
UUID.fromString("86da462e-fac4-4f46-87ed-63eafc81be48"),
Theme.builder()
.mainColor("#12f64e")
.brandText("Brand")
.shortCompanyUrl("short-url")
.build()
);
var credentials = Credentials.FromAppIdAndPrivateKeyPath(applicationId, privateKeyPath);
var client = new VonageClient(credentials);
var request = UpdateThemeRequest.Build()
.WithThemeId(new Guid("86da462e-fac4-4f46-87ed-63eafc81be48"))
.WithColor(Color.FromArgb(255, 18, 246, 78))
.WithBrandText("Brand")
.WithShortCompanyUrl(new Uri("short-url", UriKind.Relative))
.Create();
var response = await client.MeetingsClient.UpdateThemeAsync(request);
$keypair = new Vonage\Client\Keypair(
VONAGE_APPLICATION_PRIVATE_KEY_PATH
VONAGE_APPLICATION_ID,
);
$client = new Vonage\Client($keypair);
$applicationTheme = $client->meetings()->updateTheme('49d900c8-372b-4c9e-b682-5601cbdc1f7a', [
'update_details' => [
'theme_name' => 'blue-theme',
'main_color' => '#0000ff'
'brand_text' => 'Blue'
'short_company_ul' => 'https://my-app/35f5D'
]
]);
client = vonage.Client(
application_id=VONAGE_APPLICATION_ID,
private_key=VONAGE_APPLICATION_PRIVATE_KEY_PATH,
)
response = client.meetings.update_theme(
'49d900c8-372b-4c9e-b682-5601cbdc1f7a',
{
'theme_name': 'blue-theme',
'main_color': '#0000ff',
'brand_text': 'Blue',
},
)
Ejemplo de respuesta
{
"theme_id": "ef2b46f3-8ebb-437e-a671-272e4990fbc8",
"theme_name": "Theme1",
"domain": "VCP",
"account_id": "123ab4cd",
"application_id": "921a6f5b-1f94-49f4-8107-26f0c75fc6e7",
"main_color": "#12f64e",
"short_company_url": "short-url",
"brand_text": "Brand",
"brand_image_colored": "branded-image-colored",
"brand_image_white": "branded-image-white",
"branded_favicon": "branded-favicon",
"brand_image_colored_url": "branded-image-colored-url",
"brand_image_white_url": "branded-image-white-url",
"branded_favicon_url": "branded-favicon-url"
}
Obtener un tema
https://api-eu.vonage.com/v1/meetings/themes/:theme_id
Envíe una solicitud
Ejemplo de solicitud
const credentials = new Auth({
privateKey: VONAGE_APPLICATION_PRIVATE_KEY_PATH,
applicationId: VONAGE_APPLICATION_ID,
});
const options = {};
const meetingsClient = new Meetings(credentials, options);
const theme = await meetingsClient.getTheme("ef2b46f3-8ebb-437e-a671-272e4990fbc8");
var client = VonageClient.builder()
.applicationId(VONAGE_APPLICATION_ID)
.privateKeyPath(VONAGE_PRIVATE_KEY_PATH)
.build();
var theme = client.getMeetingsClient().getTheme(
UUID.fromString("ef2b46f3-8ebb-437e-a671-272e4990fbc8")
);
var credentials = Credentials.FromAppIdAndPrivateKeyPath(applicationId, privateKeyPath);
var client = new VonageClient(credentials);
var request = GetThemeRequest.Parse(new Guid("ef2b46f3-8ebb-437e-a671-272e4990fbc8"));
var response = await client.MeetingsClient.GetThemeAsync(request);
$keypair = new Vonage\Client\Keypair(
VONAGE_APPLICATION_PRIVATE_KEY_PATH
VONAGE_APPLICATION_ID,
);
$client = new Vonage\Client($keypair);
$theme = $client->meetings()->getThemeById('9f6fe8ae-3458-4a72-b532-8276d5533e97');
client = vonage.Client(
application_id=VONAGE_APPLICATION_ID,
private_key=VONAGE_APPLICATION_PRIVATE_KEY_PATH,
)
response = client.meetings.get_theme('ef2b46f3-8ebb-437e-a671-272e4990fbc8')
Esto devolverá un Vonage::Response objeto.
En Vonage::Response de-serializa los datos JSON devueltos en Vonage::Entity y proporciona métodos getter para las propiedades de nivel superior de esos datos JSON, por ejemplo:
Ejemplo de respuesta
{
"theme_id": "ef2b46f3-8ebb-437e-a671-272e4990fbc8",
"theme_name": "Theme1",
"domain": "VCP",
"account_id": "123ab4cd",
"application_id": "921a6f5b-1f94-49f4-8107-26f0c75fc6e7",
"main_color": "#12f64e",
"short_company_url": "short-url",
"brand_text": "Brand",
"brand_image_colored": "branded-image-colored",
"brand_image_white": "branded-image-white",
"branded_favicon": "branded-favicon",
"brand_image_colored_url": "branded-image-colored-url",
"brand_image_white_url": "branded-image-white-url",
"branded_favicon_url": "branded-favicon-url"
}
Tematizar una habitación
Un tema puede aplicarse a un Habitación de larga duración al crear o actualizar una sala.
Creación de salas
https://api-eu.vonage.com/v1/meetings/rooms
Este ejemplo crear una sala de reuniones a largo plazo con el tema naranja:
const credentials = new Auth({
privateKey: VONAGE_APPLICATION_PRIVATE_KEY_PATH,
applicationId: VONAGE_APPLICATION_ID,
});
const options = {};
const meetingsClient = new Meetings(credentials, options);
await meetingsClient.createRoom({
type: MeetingType.LONG_TERM,
displayName: "New Meetings Room",
availableFeatures: {
isRecordingAvailable: true,
},
themeId: "e8b1d80b-8f78-4578-94f2-328596e01387",
});
var client = VonageClient.builder()
.applicationId(VONAGE_APPLICATION_ID)
.privateKeyPath(VONAGE_PRIVATE_KEY_PATH)
.build();
var room = MeetingRoom.builder("New Meeting Room")
.type(RoomType.LONG_TERM)
.expiresAt(EXPIRATION_DATE)
.themeId(UUID.fromString(
"e8b1d80b-8f78-4578-94f2-328596e01387"
))
.build();
client.getMeetingsClient().createRoom(room);
var credentials = Credentials.FromAppIdAndPrivateKeyPath(applicationId, privateKeyPath);
var client = new VonageClient(credentials);
var request = CreateRoomRequest.Build()
.WithDisplayName("New Meetings Room")
.AsLongTermRoom(expirationDate)
.WithThemeId("e8b1d80b-8f78-4578-94f2-328596e01387")
.Create();
var response = await client.MeetingsClient.CreateRoomAsync(request);
$keypair = new Vonage\Client\Keypair(
VONAGE_APPLICATION_PRIVATE_KEY_PATH
VONAGE_APPLICATION_ID,
);
$client = new Vonage\Client($keypair);
$room = (new Vonage\Meetings\Room())->fromArray([
'display_name' => 'New Meeting Room',
'type' => 'long_term',
'expires_at' => '2024-07-10 15:00:00.000',
'theme_id' => '49d900c8-372b-4c9e-b682-5601cbdc1f7a'
]);
$createdRoom = $client->meetings()->createRoom($room);
client = vonage.Client(
application_id=VONAGE_APPLICATION_ID,
private_key=VONAGE_APPLICATION_PRIVATE_KEY_PATH,
)
response = client.meetings.create_room({
'display_name': 'New Meeting Room',
'type': 'long_term',
'expires_at': '2024-07-10 15:00:00.000',
'theme_id': '49d900c8-372b-4c9e-b682-5601cbdc1f7a',
})
Actualización de la sala
PATCH: https://api-eu.vonage.com/v1/meetings/rooms/{ROOM_ID}
Para actualizar el tema de una habitación, necesitará la función theme_id e identificación de la habitación:
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.themeId = "e8b1d80b-8f78-4578-94f2-328596e01387";
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()
.themeId(UUID.fromString(
"e8b1d80b-8f78-4578-94f2-328596e01387"
))
.build()
);
var credentials = Credentials.FromAppIdAndPrivateKeyPath(applicationId, privateKeyPath);
var client = new VonageClient(credentials);
var request = UpdateRoomRequest.Build()
.WithRoomId(new Guid("9f6fe8ae-3458-4a72-b532-8276d5533e97"))
.WithThemeId("e8b1d80b-8f78-4578-94f2-328596e01387")
.Create();
var response = await client.MeetingsClient.UpdateRoomAsync(request);
$keypair = new Vonage\Client\Keypair(
VONAGE_APPLICATION_PRIVATE_KEY_PATH
VONAGE_APPLICATION_ID,
);
$client = new Vonage\Client($keypair);
$applicationTheme = $client->meetings()->updateRoom('9f6fe8ae-3458-4a72-b532-8276d5533e97' [
'update_details' => [
'theme_id' => 'e8b1d80b-8f78-4578-94f2-328596e01387',
]
]);
client = vonage.Client(
application_id=VONAGE_APPLICATION_ID,
private_key=VONAGE_APPLICATION_PRIVATE_KEY_PATH,
)
response = client.meetings.update_room(
'9f6fe8ae-3458-4a72-b532-8276d5533e97',
{'update_details': {'theme_id': 'e8b1d80b-8f78-4578-94f2-328596e01387'}},
)
Eliminar un tema de una habitación
PATCH: https://api-eu.vonage.com/v1/meetings/rooms/{ROOM_ID}
Para eliminar un tema de una sala, actualice la sala mediante una opción PATCH y el ID de la sala. Actualice el theme_id con null para eliminar el tema y utilizar el tema por defecto en su lugar.
Tenga en cuenta que sólo se pueden actualizar las habitaciones de larga estancia.
Ejemplo de solicitud
const credentials = new Auth({
privateKey: VONAGE_APPLICATION_PRIVATE_KEY_PATH,
applicationId: VONAGE_APPLICATION_ID,
});
const options = {};
const meetingsClient = new Meetings(credentials, options);
await meetingsClient.updateRoom(ROOM_ID, "9f6fe8ae-3458-4a72-b532-8276d5533e97");
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().themeId(null).build()
);
var credentials = Credentials.FromAppIdAndPrivateKeyPath(applicationId, privateKeyPath);
var client = new VonageClient(credentials);
var request = UpdateRoomRequest.Build()
.WithRoomId(new Guid("9f6fe8ae-3458-4a72-b532-8276d5533e97"))
.WithThemeId(null)
.Create();
var response = await client.MeetingsClient.UpdateRoomAsync(request);
$keypair = new Vonage\Client\Keypair(
VONAGE_APPLICATION_PRIVATE_KEY_PATH
VONAGE_APPLICATION_ID,
);
$client = new Vonage\Client($keypair);
$room = $client->meetings()->updateRoom(
'9f6fe8ae-3458-4a72-b532-8276d5533e97',
[
'update_details' => [
'theme_id' => ''
]
]
);
client = vonage.Client(
application_id=VONAGE_APPLICATION_ID,
private_key=VONAGE_APPLICATION_PRIVATE_KEY_PATH,
)
response = client.meetings.update_room(
'9f6fe8ae-3458-4a72-b532-8276d5533e97',
{'update_details': {'theme_id': None}}
)
Establecer tema por defecto
PATCH: https://api-eu.vonage.com/v1/meetings/applications
Un tema puede establecerse como tema por defecto para la aplicación, lo que significa que todas las salas creadas utilizarán automáticamente el tema por defecto. Para ello, cree primero un tema y, a continuación, añádalo como tema por defecto de la aplicación. default_theme_id en un objeto llamado update_details.
Ejemplo de solicitud
const credentials = new Auth({
privateKey: VONAGE_APPLICATION_PRIVATE_KEY_PATH,
applicationId: VONAGE_APPLICATION_ID,
});
const options = {};
const meetingsClient = new Meetings(credentials, options);
await meetingsClient.setDefaultTheme("e8b1d80b-8f78-4578-94f2-328596e01387");
var client = VonageClient.builder()
.applicationId(VONAGE_APPLICATION_ID)
.privateKeyPath(VONAGE_PRIVATE_KEY_PATH)
.build();
var application = client.getMeetingsClient().updateApplication(
UpdateApplicationRequest.builder()
.defaultThemeId(UUID.fromString(
"e8b1d80b-8f78-4578-94f2-328596e01387"
))
.build()
);
var credentials = Credentials.FromAppIdAndPrivateKeyPath(applicationId, privateKeyPath);
var client = new VonageClient(credentials);
var request = UpdateApplicationRequest.Parse(new Guid("e8b1d80b-8f78-4578-94f2-328596e01387"));
var response = await client.MeetingsClient.UpdateApplicationAsync(request);
$keypair = new Vonage\Client\Keypair(
VONAGE_APPLICATION_PRIVATE_KEY_PATH
VONAGE_APPLICATION_ID,
);
$client = new Vonage\Client($keypair);
$updatedApplication = $client->meetings()->updateApplication([
'update_details' => [
'default_theme_id' => 'e8b1d80b-8f78-4578-94f2-328596e01387'
]
]);
client = vonage.Client(
application_id=VONAGE_APPLICATION_ID,
private_key=VONAGE_APPLICATION_PRIVATE_KEY_PATH,
)
response = client.meetings.update_application_theme('e8b1d80b-8f78-4578-94f2-328596e01387')
Ejemplo de respuesta
{
"application_id":"3db604ce-b4c0-48f4-8b82-4a03ac9f6bk7",
"account_id":"69b2a6d2",
"default_theme_id":"e8b1d80b-8f78-4578-94f2-328596e01387"
}
Eliminar un tema
[BORRAR]: https://api-eu.vonage.com/v1/meetings/themes/{THEME_ID}
Para eliminar un tema, envíe una solicitud DELETE utilizando el ID del tema. Tenga en cuenta que un tema que esté configurado como predeterminado o que esté siendo utilizado por cualquier sala no se puede eliminar y devolverá un error.
Para eliminar un tema en uso, debe eliminarlo de cada sala que lo esté utilizando de la siguiente manera encontrar todas las salas que utilizan ese tema y eliminar el tema.
Alternativamente, si desea anular y eliminar el tema sin eliminarlo manualmente, añada un parámetro de consulta de force=true. El tema predeterminado se aplicará ahora a todas las salas que estaban utilizando este tema.
const credentials = new Auth({
privateKey: VONAGE_APPLICATION_PRIVATE_KEY_PATH,
applicationId: VONAGE_APPLICATION_ID,
});
const options = {};
const meetingsClient = new Meetings(credentials, options);
await meetingsClient.deleteTheme("e8b1d80b-8f78-4578-94f2-328596e01387", true);
var client = VonageClient.builder()
.applicationId(VONAGE_APPLICATION_ID)
.privateKeyPath(VONAGE_PRIVATE_KEY_PATH)
.build();
var themeId = UUID.fromString("e8b1d80b-8f78-4578-94f2-328596e01387");
client.getMeetingsClient().deleteTheme(themeId, true);
var credentials = Credentials.FromAppIdAndPrivateKeyPath(applicationId, privateKeyPath);
var client = new VonageClient(credentials);
var request = DeleteThemeRequest.Build()
.WithThemeId(new Guid("e8b1d80b-8f78-4578-94f2-328596e01387"))
.WithForceDelete()
.Create();
var response = await client.MeetingsClient.DeleteThemeAsync(request);
$keypair = new Vonage\Client\Keypair(
VONAGE_APPLICATION_PRIVATE_KEY_PATH
VONAGE_APPLICATION_ID,
);
$client = new Vonage\Client($keypair);
$client->meetings()->deleteTheme('9f6fe8ae-3458-4a72-b532-8276d5533e97', true);
client = vonage.Client(
application_id=VONAGE_APPLICATION_ID,
private_key=VONAGE_APPLICATION_PRIVATE_KEY_PATH,
)
client.meetings.delete_theme('e8b1d80b-8f78-4578-94f2-328596e01387', force=True)
Obtener todas las habitaciones con un tema determinado
https://api-eu.vonage.com/v1/meetings/themes/{THEME_ID}/rooms
Para obtener una lista de las salas que utilizan un tema determinado, envíe una solicitud
theme_id: Ejemplo de solicitud
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.getRoomsForTheme("e8b1d80b-8f78-4578-94f2-328596e01387");
var client = VonageClient.builder()
.applicationId(VONAGE_APPLICATION_ID)
.privateKeyPath(VONAGE_PRIVATE_KEY_PATH)
.build();
var rooms = client.getMeetingsClient().searchRoomsByTheme(
UUID.fromString("e8b1d80b-8f78-4578-94f2-328596e01387")
);
var client = new VonageClient(credentials);
var request = GetRoomsByThemeRequest.Build()
.WithThemeId(new Guid("e8b1d80b-8f78-4578-94f2-328596e01387"))
.Create();
var response = await client.MeetingsClient.GetRoomsByThemeAsync(request);
$keypair = new Vonage\Client\Keypair(
VONAGE_APPLICATION_PRIVATE_KEY_PATH
VONAGE_APPLICATION_ID,
);
$client = new Vonage\Client($keypair);
$rooms = $client->meetings()->getRoomsByThemeID('e8b1d80b-8f78-4578-94f2-328596e01387');
client = vonage.Client(
application_id=VONAGE_APPLICATION_ID,
private_key=VONAGE_APPLICATION_PRIVATE_KEY_PATH,
)
response = client.meetings.list_rooms_with_theme_id('e8b1d80b-8f78-4578-94f2-328596e01387')
Esto devolverá un objeto del tipo Vonage::Meetings::Rooms::ListResponse clase.
Esta clase define un each que le permite iterar a través del método _embedded devuelto en la respuesta. Por ejemplo:
La clase también incluye Enumerablepor lo que puede llamar a cualquier método de instancia de ese módulo en el objeto. Por ejemplo:
Esto devolverá una lista de todas las salas que utilizan este tema.