delphiDll / Zoom API / Update Zoom Room settings
Back to Collection Items
var
http: HCkHttp;
success: Boolean;
req: HCkHttpRequest;
jsonFormData1: HCkJsonObject;
jsonFormData2: HCkJsonObject;
resp: HCkHttpResponse;
sbResponseBody: HCkStringBuilder;
jResp: HCkJsonObject;
respStatusCode: Integer;
begin
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
http := CkHttp_Create();
req := CkHttpRequest_Create();
CkHttpRequest_putHttpVerb(req,'PATCH');
CkHttpRequest_putPath(req,'/');
CkHttpRequest_putContentType(req,'multipart/form-data');
jsonFormData1 := CkJsonObject_Create();
CkJsonObject_UpdateBool(jsonFormData1,'upcoming_meeting_alert',True);
CkJsonObject_UpdateBool(jsonFormData1,'show_alert_before_meeting',True);
CkJsonObject_UpdateBool(jsonFormData1,'start_airplay_mirroring',True);
CkJsonObject_UpdateBool(jsonFormData1,'start_airplay_manually',True);
CkJsonObject_UpdateBool(jsonFormData1,'weekly_system_restart',False);
CkJsonObject_UpdateBool(jsonFormData1,'display_meeting_list',False);
CkJsonObject_UpdateBool(jsonFormData1,'display_top_banner',True);
CkJsonObject_UpdateBool(jsonFormData1,'display_feedback_survey',True);
CkJsonObject_UpdateBool(jsonFormData1,'auto_direct_sharing',True);
CkJsonObject_UpdateBool(jsonFormData1,'transform_meeting_to_private',True);
CkJsonObject_UpdateBool(jsonFormData1,'hide_id_for_private_meeting',False);
CkJsonObject_UpdateBool(jsonFormData1,'auto_start_scheduled_meeting',True);
CkJsonObject_UpdateBool(jsonFormData1,'auto_stop_scheduled_meeting',False);
CkJsonObject_UpdateBool(jsonFormData1,'hide_share_instruction',False);
CkJsonObject_UpdateBool(jsonFormData1,'audio_device_daily_auto_test',False);
CkJsonObject_UpdateBool(jsonFormData1,'support_join_3rd_party_meeting',False);
CkJsonObject_UpdateBool(jsonFormData1,'encrypt_shared_screen_content',False);
CkJsonObject_UpdateBool(jsonFormData1,'allow_multiple_content_sharing',True);
CkJsonObject_UpdateBool(jsonFormData1,'show_non_video_participants',True);
CkJsonObject_UpdateBool(jsonFormData1,'show_call_history_in_room',False);
CkJsonObject_UpdateBool(jsonFormData1,'show_contact_list_on_controller',True);
CkJsonObject_UpdateBool(jsonFormData1,'count_attendees_number_in_room',True);
CkJsonObject_UpdateBool(jsonFormData1,'send_whiteboard_to_internal_contact_only',False);
CkHttpRequest_AddStringForUpload2(req,'zoom_rooms','',jsonFormData1,'utf-8','application/json');
jsonFormData2 := CkJsonObject_Create();
CkJsonObject_UpdateBool(jsonFormData2,'upcoming_meeting_alert',True);
CkJsonObject_UpdateBool(jsonFormData2,'show_alert_before_meeting',True);
CkJsonObject_UpdateBool(jsonFormData2,'start_airplay_mirroring',True);
CkJsonObject_UpdateBool(jsonFormData2,'start_airplay_manually',True);
CkJsonObject_UpdateBool(jsonFormData2,'weekly_system_restart',False);
CkJsonObject_UpdateBool(jsonFormData2,'display_meeting_list',False);
CkJsonObject_UpdateBool(jsonFormData2,'display_top_banner',True);
CkJsonObject_UpdateBool(jsonFormData2,'display_feedback_survey',True);
CkJsonObject_UpdateBool(jsonFormData2,'auto_direct_sharing',True);
CkJsonObject_UpdateBool(jsonFormData2,'transform_meeting_to_private',True);
CkJsonObject_UpdateBool(jsonFormData2,'hide_id_for_private_meeting',False);
CkJsonObject_UpdateBool(jsonFormData2,'auto_start_scheduled_meeting',True);
CkJsonObject_UpdateBool(jsonFormData2,'auto_stop_scheduled_meeting',False);
CkJsonObject_UpdateBool(jsonFormData2,'hide_share_instruction',False);
CkJsonObject_UpdateBool(jsonFormData2,'audio_device_daily_auto_test',False);
CkJsonObject_UpdateBool(jsonFormData2,'support_join_3rd_party_meeting',False);
CkJsonObject_UpdateBool(jsonFormData2,'encrypt_shared_screen_content',False);
CkJsonObject_UpdateBool(jsonFormData2,'allow_multiple_content_sharing',True);
CkJsonObject_UpdateBool(jsonFormData2,'show_non_video_participants',True);
CkJsonObject_UpdateBool(jsonFormData2,'show_call_history_in_room',False);
CkJsonObject_UpdateBool(jsonFormData2,'show_contact_list_on_controller',True);
CkJsonObject_UpdateBool(jsonFormData2,'count_attendees_number_in_room',True);
CkJsonObject_UpdateBool(jsonFormData2,'send_whiteboard_to_internal_contact_only',False);
CkHttpRequest_AddStringForUpload2(req,'meeting_security','',jsonFormData2,'utf-8','application/json');
CkHttpRequest_AddHeader(req,'Authorization','Bearer <access_token>');
resp := CkHttp_SynchronousRequest(http,'reprehenderit',80,False,req);
if (CkHttp_getLastMethodSuccess(http) = False) then
begin
Memo1.Lines.Add(CkHttp__lastErrorText(http));
Exit;
end;
sbResponseBody := CkStringBuilder_Create();
CkHttpResponse_GetBodySb(resp,sbResponseBody);
jResp := CkJsonObject_Create();
CkJsonObject_LoadSb(jResp,sbResponseBody);
CkJsonObject_putEmitCompact(jResp,False);
Memo1.Lines.Add('Response Body:');
Memo1.Lines.Add(CkJsonObject__emit(jResp));
respStatusCode := CkHttpResponse_getStatusCode(resp);
Memo1.Lines.Add('Response Status Code = ' + IntToStr(respStatusCode));
if (respStatusCode >= 400) then
begin
Memo1.Lines.Add('Response Header:');
Memo1.Lines.Add(CkHttpResponse__header(resp));
Memo1.Lines.Add('Failed.');
CkHttpResponse_Dispose(resp);
Exit;
end;
CkHttpResponse_Dispose(resp);
CkHttp_Dispose(http);
CkHttpRequest_Dispose(req);
CkJsonObject_Dispose(jsonFormData1);
CkJsonObject_Dispose(jsonFormData2);
CkStringBuilder_Dispose(sbResponseBody);
CkJsonObject_Dispose(jResp);
Curl Command
curl -X PATCH
-H "Authorization: Bearer <access_token>"
-H "Content-Type: multipart/form-data"
--form 'zoom_rooms={"upcoming_meeting_alert":true,"show_alert_before_meeting":true,"start_airplay_mirroring":true,"start_airplay_manually":true,"weekly_system_restart":false,"display_meeting_list":false,"display_top_banner":true,"display_feedback_survey":true,"auto_direct_sharing":true,"transform_meeting_to_private":true,"hide_id_for_private_meeting":false,"auto_start_scheduled_meeting":true,"auto_stop_scheduled_meeting":false,"hide_share_instruction":false,"audio_device_daily_auto_test":false,"support_join_3rd_party_meeting":false,"encrypt_shared_screen_content":false,"allow_multiple_content_sharing":true,"show_non_video_participants":true,"show_call_history_in_room":false,"show_contact_list_on_controller":true,"count_attendees_number_in_room":true,"send_whiteboard_to_internal_contact_only":false}'
--form 'meeting_security={"upcoming_meeting_alert":true,"show_alert_before_meeting":true,"start_airplay_mirroring":true,"start_airplay_manually":true,"weekly_system_restart":false,"display_meeting_list":false,"display_top_banner":true,"display_feedback_survey":true,"auto_direct_sharing":true,"transform_meeting_to_private":true,"hide_id_for_private_meeting":false,"auto_start_scheduled_meeting":true,"auto_stop_scheduled_meeting":false,"hide_share_instruction":false,"audio_device_daily_auto_test":false,"support_join_3rd_party_meeting":false,"encrypt_shared_screen_content":false,"allow_multiple_content_sharing":true,"show_non_video_participants":true,"show_call_history_in_room":false,"show_contact_list_on_controller":true,"count_attendees_number_in_room":true,"send_whiteboard_to_internal_contact_only":false}{"end_to_end_encrypted_meetings":true,"encryption_type":"enhanced_encryption"}'
https://api.zoom.us/v2/rooms/:roomId/settings?setting_type=quis officia in reprehenderit
Postman Collection Item JSON
{
"name": "Update Zoom Room settings",
"request": {
"auth": {
"type": "oauth2"
},
"method": "PATCH",
"header": [
{
"key": "Content-Type",
"value": "multipart/form-data"
}
],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "zoom_rooms",
"value": "{\"upcoming_meeting_alert\":true,\"show_alert_before_meeting\":true,\"start_airplay_mirroring\":true,\"start_airplay_manually\":true,\"weekly_system_restart\":false,\"display_meeting_list\":false,\"display_top_banner\":true,\"display_feedback_survey\":true,\"auto_direct_sharing\":true,\"transform_meeting_to_private\":true,\"hide_id_for_private_meeting\":false,\"auto_start_scheduled_meeting\":true,\"auto_stop_scheduled_meeting\":false,\"hide_share_instruction\":false,\"audio_device_daily_auto_test\":false,\"support_join_3rd_party_meeting\":false,\"encrypt_shared_screen_content\":false,\"allow_multiple_content_sharing\":true,\"show_non_video_participants\":true,\"show_call_history_in_room\":false,\"show_contact_list_on_controller\":true,\"count_attendees_number_in_room\":true,\"send_whiteboard_to_internal_contact_only\":false}",
"type": "text"
},
{
"key": "meeting_security",
"value": "{\"end_to_end_encrypted_meetings\":true,\"encryption_type\":\"enhanced_encryption\"}",
"type": "text"
}
]
},
"url": {
"raw": "{{baseUrl}}/rooms/:roomId/settings?setting_type=quis officia in reprehenderit",
"host": [
"{{baseUrl}}"
],
"path": [
"rooms",
":roomId",
"settings"
],
"query": [
{
"key": "setting_type",
"value": "quis officia in reprehenderit",
"description": "The type of setting that you would like to update.<br> `alert`: Alert Settings applied on the Zoom Room.<br>\n`meeting`: Meeting settings of the Zoom Room.<br>\n`signage`: Digital signage settings applied on the Zoom Room."
}
],
"variable": [
{
"key": "roomId",
"value": "quis officia in reprehenderit",
"description": "(Required) Unique Identifier of the Zoom Room."
}
]
},
"description": "Update either meeting or alert settings applied to a specific Zoom Room. To update **Alert Settings**, specify `alert` as the value of the `setting_type` query parameter. To update **Meeting Settings**, specify `meeting` as the value of the `setting_type` query parameter.<br>\n**Prerequisites:**<br>\n* Zoom Room licenses\n* Owner or Admin privileges on the Zoom Account.<br>\n**Scopes:** `room:write:admin`<br> \n **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Medium`"
},
"response": [
{
"name": "**HTTP Status Code:** `204` **No Content**<br>\nSettings updated successfully. ",
"originalRequest": {
"method": "PATCH",
"header": [
{
"description": "Added as a part of security scheme: oauth2",
"key": "Authorization",
"value": "<token>"
}
],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "zoom_rooms",
"value": "{\"upcoming_meeting_alert\":true,\"show_alert_before_meeting\":true,\"start_airplay_mirroring\":true,\"start_airplay_manually\":true,\"weekly_system_restart\":false,\"display_meeting_list\":false,\"display_top_banner\":true,\"display_feedback_survey\":true,\"auto_direct_sharing\":true,\"transform_meeting_to_private\":true,\"hide_id_for_private_meeting\":false,\"auto_start_scheduled_meeting\":true,\"auto_stop_scheduled_meeting\":false,\"hide_share_instruction\":false,\"audio_device_daily_auto_test\":false,\"support_join_3rd_party_meeting\":false,\"encrypt_shared_screen_content\":false,\"allow_multiple_content_sharing\":true,\"show_non_video_participants\":true,\"show_call_history_in_room\":false,\"show_contact_list_on_controller\":true,\"count_attendees_number_in_room\":true,\"send_whiteboard_to_internal_contact_only\":false}",
"type": "text"
},
{
"key": "meeting_security",
"value": "{\"end_to_end_encrypted_meetings\":true,\"encryption_type\":\"enhanced_encryption\"}",
"type": "text"
}
]
},
"url": {
"raw": "{{baseUrl}}/rooms/:roomId/settings?setting_type=quis officia in reprehenderit",
"host": [
"{{baseUrl}}"
],
"path": [
"rooms",
":roomId",
"settings"
],
"query": [
{
"key": "setting_type",
"value": "quis officia in reprehenderit"
}
],
"variable": [
{
"key": "roomId",
"value": "quis officia in reprehenderit",
"description": "(Required) Unique Identifier of the Zoom Room."
}
]
}
},
"status": "No Content",
"code": 204,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"cookie": [
],
"body": "{}"
},
{
"name": "**HTTP Status Code:** `400` **Bad Request**<br><br>\n**Error Code:** `200`<br>\nZoom Room subscription not found. Try again after purchasing a Zoom Room subscription.<br>\nAccess restricted.",
"originalRequest": {
"method": "PATCH",
"header": [
{
"description": "Added as a part of security scheme: oauth2",
"key": "Authorization",
"value": "<token>"
}
],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "zoom_rooms",
"value": "{\"upcoming_meeting_alert\":true,\"show_alert_before_meeting\":true,\"start_airplay_mirroring\":true,\"start_airplay_manually\":true,\"weekly_system_restart\":false,\"display_meeting_list\":false,\"display_top_banner\":true,\"display_feedback_survey\":true,\"auto_direct_sharing\":true,\"transform_meeting_to_private\":true,\"hide_id_for_private_meeting\":false,\"auto_start_scheduled_meeting\":true,\"auto_stop_scheduled_meeting\":false,\"hide_share_instruction\":false,\"audio_device_daily_auto_test\":false,\"support_join_3rd_party_meeting\":false,\"encrypt_shared_screen_content\":false,\"allow_multiple_content_sharing\":true,\"show_non_video_participants\":true,\"show_call_history_in_room\":false,\"show_contact_list_on_controller\":true,\"count_attendees_number_in_room\":true,\"send_whiteboard_to_internal_contact_only\":false}",
"type": "text"
},
{
"key": "meeting_security",
"value": "{\"end_to_end_encrypted_meetings\":true,\"encryption_type\":\"enhanced_encryption\"}",
"type": "text"
}
]
},
"url": {
"raw": "{{baseUrl}}/rooms/:roomId/settings?setting_type=quis officia in reprehenderit",
"host": [
"{{baseUrl}}"
],
"path": [
"rooms",
":roomId",
"settings"
],
"query": [
{
"key": "setting_type",
"value": "quis officia in reprehenderit"
}
],
"variable": [
{
"key": "roomId",
"value": "quis officia in reprehenderit",
"description": "(Required) Unique Identifier of the Zoom Room."
}
]
}
},
"status": "Bad Request",
"code": 400,
"_postman_previewlanguage": "text",
"header": [
{
"key": "Content-Type",
"value": "text/plain"
}
],
"cookie": [
],
"body": ""
}
]
}