SQL Server / Zoom API / Update Zoom Room settings
Back to Collection Items
-- Important: See this note about string length limitations for strings returned by sp_OAMethod calls.
--
CREATE PROCEDURE ChilkatSample
AS
BEGIN
DECLARE @hr int
DECLARE @iTmp0 int
-- Important: Do not use nvarchar(max). See the warning about using nvarchar(max).
DECLARE @sTmp0 nvarchar(4000)
-- This example assumes the Chilkat API to have been previously unlocked.
-- See Global Unlock Sample for sample code.
DECLARE @http int
-- Use "Chilkat_9_5_0.Http" for versions of Chilkat < 10.0.0
EXEC @hr = sp_OACreate 'Chilkat.Http', @http OUT
IF @hr <> 0
BEGIN
PRINT 'Failed to create ActiveX component'
RETURN
END
DECLARE @success int
DECLARE @req int
-- Use "Chilkat_9_5_0.HttpRequest" for versions of Chilkat < 10.0.0
EXEC @hr = sp_OACreate 'Chilkat.HttpRequest', @req OUT
EXEC sp_OASetProperty @req, 'HttpVerb', 'PATCH'
EXEC sp_OASetProperty @req, 'Path', '/'
EXEC sp_OASetProperty @req, 'ContentType', 'multipart/form-data'
DECLARE @jsonFormData1 int
-- Use "Chilkat_9_5_0.JsonObject" for versions of Chilkat < 10.0.0
EXEC @hr = sp_OACreate 'Chilkat.JsonObject', @jsonFormData1 OUT
EXEC sp_OAMethod @jsonFormData1, 'UpdateBool', @success OUT, 'upcoming_meeting_alert', 1
EXEC sp_OAMethod @jsonFormData1, 'UpdateBool', @success OUT, 'show_alert_before_meeting', 1
EXEC sp_OAMethod @jsonFormData1, 'UpdateBool', @success OUT, 'start_airplay_mirroring', 1
EXEC sp_OAMethod @jsonFormData1, 'UpdateBool', @success OUT, 'start_airplay_manually', 1
EXEC sp_OAMethod @jsonFormData1, 'UpdateBool', @success OUT, 'weekly_system_restart', 0
EXEC sp_OAMethod @jsonFormData1, 'UpdateBool', @success OUT, 'display_meeting_list', 0
EXEC sp_OAMethod @jsonFormData1, 'UpdateBool', @success OUT, 'display_top_banner', 1
EXEC sp_OAMethod @jsonFormData1, 'UpdateBool', @success OUT, 'display_feedback_survey', 1
EXEC sp_OAMethod @jsonFormData1, 'UpdateBool', @success OUT, 'auto_direct_sharing', 1
EXEC sp_OAMethod @jsonFormData1, 'UpdateBool', @success OUT, 'transform_meeting_to_private', 1
EXEC sp_OAMethod @jsonFormData1, 'UpdateBool', @success OUT, 'hide_id_for_private_meeting', 0
EXEC sp_OAMethod @jsonFormData1, 'UpdateBool', @success OUT, 'auto_start_scheduled_meeting', 1
EXEC sp_OAMethod @jsonFormData1, 'UpdateBool', @success OUT, 'auto_stop_scheduled_meeting', 0
EXEC sp_OAMethod @jsonFormData1, 'UpdateBool', @success OUT, 'hide_share_instruction', 0
EXEC sp_OAMethod @jsonFormData1, 'UpdateBool', @success OUT, 'audio_device_daily_auto_test', 0
EXEC sp_OAMethod @jsonFormData1, 'UpdateBool', @success OUT, 'support_join_3rd_party_meeting', 0
EXEC sp_OAMethod @jsonFormData1, 'UpdateBool', @success OUT, 'encrypt_shared_screen_content', 0
EXEC sp_OAMethod @jsonFormData1, 'UpdateBool', @success OUT, 'allow_multiple_content_sharing', 1
EXEC sp_OAMethod @jsonFormData1, 'UpdateBool', @success OUT, 'show_non_video_participants', 1
EXEC sp_OAMethod @jsonFormData1, 'UpdateBool', @success OUT, 'show_call_history_in_room', 0
EXEC sp_OAMethod @jsonFormData1, 'UpdateBool', @success OUT, 'show_contact_list_on_controller', 1
EXEC sp_OAMethod @jsonFormData1, 'UpdateBool', @success OUT, 'count_attendees_number_in_room', 1
EXEC sp_OAMethod @jsonFormData1, 'UpdateBool', @success OUT, 'send_whiteboard_to_internal_contact_only', 0
EXEC sp_OAMethod @req, 'AddStringForUpload2', @success OUT, 'zoom_rooms', '', @jsonFormData1, 'utf-8', 'application/json'
DECLARE @jsonFormData2 int
-- Use "Chilkat_9_5_0.JsonObject" for versions of Chilkat < 10.0.0
EXEC @hr = sp_OACreate 'Chilkat.JsonObject', @jsonFormData2 OUT
EXEC sp_OAMethod @jsonFormData2, 'UpdateBool', @success OUT, 'upcoming_meeting_alert', 1
EXEC sp_OAMethod @jsonFormData2, 'UpdateBool', @success OUT, 'show_alert_before_meeting', 1
EXEC sp_OAMethod @jsonFormData2, 'UpdateBool', @success OUT, 'start_airplay_mirroring', 1
EXEC sp_OAMethod @jsonFormData2, 'UpdateBool', @success OUT, 'start_airplay_manually', 1
EXEC sp_OAMethod @jsonFormData2, 'UpdateBool', @success OUT, 'weekly_system_restart', 0
EXEC sp_OAMethod @jsonFormData2, 'UpdateBool', @success OUT, 'display_meeting_list', 0
EXEC sp_OAMethod @jsonFormData2, 'UpdateBool', @success OUT, 'display_top_banner', 1
EXEC sp_OAMethod @jsonFormData2, 'UpdateBool', @success OUT, 'display_feedback_survey', 1
EXEC sp_OAMethod @jsonFormData2, 'UpdateBool', @success OUT, 'auto_direct_sharing', 1
EXEC sp_OAMethod @jsonFormData2, 'UpdateBool', @success OUT, 'transform_meeting_to_private', 1
EXEC sp_OAMethod @jsonFormData2, 'UpdateBool', @success OUT, 'hide_id_for_private_meeting', 0
EXEC sp_OAMethod @jsonFormData2, 'UpdateBool', @success OUT, 'auto_start_scheduled_meeting', 1
EXEC sp_OAMethod @jsonFormData2, 'UpdateBool', @success OUT, 'auto_stop_scheduled_meeting', 0
EXEC sp_OAMethod @jsonFormData2, 'UpdateBool', @success OUT, 'hide_share_instruction', 0
EXEC sp_OAMethod @jsonFormData2, 'UpdateBool', @success OUT, 'audio_device_daily_auto_test', 0
EXEC sp_OAMethod @jsonFormData2, 'UpdateBool', @success OUT, 'support_join_3rd_party_meeting', 0
EXEC sp_OAMethod @jsonFormData2, 'UpdateBool', @success OUT, 'encrypt_shared_screen_content', 0
EXEC sp_OAMethod @jsonFormData2, 'UpdateBool', @success OUT, 'allow_multiple_content_sharing', 1
EXEC sp_OAMethod @jsonFormData2, 'UpdateBool', @success OUT, 'show_non_video_participants', 1
EXEC sp_OAMethod @jsonFormData2, 'UpdateBool', @success OUT, 'show_call_history_in_room', 0
EXEC sp_OAMethod @jsonFormData2, 'UpdateBool', @success OUT, 'show_contact_list_on_controller', 1
EXEC sp_OAMethod @jsonFormData2, 'UpdateBool', @success OUT, 'count_attendees_number_in_room', 1
EXEC sp_OAMethod @jsonFormData2, 'UpdateBool', @success OUT, 'send_whiteboard_to_internal_contact_only', 0
EXEC sp_OAMethod @req, 'AddStringForUpload2', @success OUT, 'meeting_security', '', @jsonFormData2, 'utf-8', 'application/json'
EXEC sp_OAMethod @req, 'AddHeader', NULL, 'Authorization', 'Bearer <access_token>'
DECLARE @resp int
EXEC sp_OAMethod @http, 'SynchronousRequest', @resp OUT, 'reprehenderit', 80, 0, @req
EXEC sp_OAGetProperty @http, 'LastMethodSuccess', @iTmp0 OUT
IF @iTmp0 = 0
BEGIN
EXEC sp_OAGetProperty @http, 'LastErrorText', @sTmp0 OUT
PRINT @sTmp0
EXEC @hr = sp_OADestroy @http
EXEC @hr = sp_OADestroy @req
EXEC @hr = sp_OADestroy @jsonFormData1
EXEC @hr = sp_OADestroy @jsonFormData2
RETURN
END
DECLARE @sbResponseBody int
-- Use "Chilkat_9_5_0.StringBuilder" for versions of Chilkat < 10.0.0
EXEC @hr = sp_OACreate 'Chilkat.StringBuilder', @sbResponseBody OUT
EXEC sp_OAMethod @resp, 'GetBodySb', @success OUT, @sbResponseBody
DECLARE @jResp int
-- Use "Chilkat_9_5_0.JsonObject" for versions of Chilkat < 10.0.0
EXEC @hr = sp_OACreate 'Chilkat.JsonObject', @jResp OUT
EXEC sp_OAMethod @jResp, 'LoadSb', @success OUT, @sbResponseBody
EXEC sp_OASetProperty @jResp, 'EmitCompact', 0
PRINT 'Response Body:'
EXEC sp_OAMethod @jResp, 'Emit', @sTmp0 OUT
PRINT @sTmp0
DECLARE @respStatusCode int
EXEC sp_OAGetProperty @resp, 'StatusCode', @respStatusCode OUT
PRINT 'Response Status Code = ' + @respStatusCode
IF @respStatusCode >= 400
BEGIN
PRINT 'Response Header:'
EXEC sp_OAGetProperty @resp, 'Header', @sTmp0 OUT
PRINT @sTmp0
PRINT 'Failed.'
EXEC @hr = sp_OADestroy @resp
EXEC @hr = sp_OADestroy @http
EXEC @hr = sp_OADestroy @req
EXEC @hr = sp_OADestroy @jsonFormData1
EXEC @hr = sp_OADestroy @jsonFormData2
EXEC @hr = sp_OADestroy @sbResponseBody
EXEC @hr = sp_OADestroy @jResp
RETURN
END
EXEC @hr = sp_OADestroy @resp
EXEC @hr = sp_OADestroy @http
EXEC @hr = sp_OADestroy @req
EXEC @hr = sp_OADestroy @jsonFormData1
EXEC @hr = sp_OADestroy @jsonFormData2
EXEC @hr = sp_OADestroy @sbResponseBody
EXEC @hr = sp_OADestroy @jResp
END
GO
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": ""
}
]
}