SQL Server / Zoom API / Get 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 @queryParams int
-- Use "Chilkat_9_5_0.JsonObject" for versions of Chilkat < 10.0.0
EXEC @hr = sp_OACreate 'Chilkat.JsonObject', @queryParams OUT
EXEC sp_OAMethod @queryParams, 'UpdateString', @success OUT, 'setting_type', 'meeting'
-- Adds the "Authorization: Bearer <access_token>" header.
EXEC sp_OASetProperty @http, 'AuthToken', '<access_token>'
DECLARE @resp int
EXEC sp_OAMethod @http, 'QuickRequestParams', @resp OUT, 'GET', 'https://api.zoom.us/v2/rooms/:roomId/settings', @queryParams
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 @queryParams
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 @queryParams
EXEC @hr = sp_OADestroy @sbResponseBody
EXEC @hr = sp_OADestroy @jResp
RETURN
END
EXEC @hr = sp_OADestroy @resp
-- Sample JSON response:
-- (Sample code for parsing the JSON response is shown below)
-- {
-- "zoom_rooms": {
-- "upcoming_meeting_alert": true,
-- "show_alert_before_meeting": false,
-- "start_airplay_manually": true,
-- "weekly_system_restart": false,
-- "display_meeting_list": false,
-- "display_top_banner": false,
-- "display_feedback_survey": true,
-- "auto_direct_sharing": false,
-- "transform_meeting_to_private": false,
-- "hide_id_for_private_meeting": false,
-- "auto_start_scheduled_meeting": true,
-- "auto_stop_scheduled_meeting": true,
-- "hide_share_instruction": true,
-- "audio_device_daily_auto_test": true,
-- "support_join_3rd_party_meeting": true,
-- "encrypt_shared_screen_content": false,
-- "allow_multiple_content_sharing": true,
-- "show_non_video_participants": false,
-- "show_call_history_in_room": true,
-- "show_contact_list_on_controller": true,
-- "count_attendees_number_in_room": true,
-- "send_whiteboard_to_internal_contact_only": true
-- }
-- }
-- Sample code for parsing the JSON response...
-- Use this online tool to generate parsing code from sample JSON: Generate JSON Parsing Code
DECLARE @Upcoming_meeting_alert int
EXEC sp_OAMethod @jResp, 'BoolOf', @Upcoming_meeting_alert OUT, 'zoom_rooms.upcoming_meeting_alert'
DECLARE @Show_alert_before_meeting int
EXEC sp_OAMethod @jResp, 'BoolOf', @Show_alert_before_meeting OUT, 'zoom_rooms.show_alert_before_meeting'
DECLARE @Start_airplay_manually int
EXEC sp_OAMethod @jResp, 'BoolOf', @Start_airplay_manually OUT, 'zoom_rooms.start_airplay_manually'
DECLARE @Weekly_system_restart int
EXEC sp_OAMethod @jResp, 'BoolOf', @Weekly_system_restart OUT, 'zoom_rooms.weekly_system_restart'
DECLARE @Display_meeting_list int
EXEC sp_OAMethod @jResp, 'BoolOf', @Display_meeting_list OUT, 'zoom_rooms.display_meeting_list'
DECLARE @Display_top_banner int
EXEC sp_OAMethod @jResp, 'BoolOf', @Display_top_banner OUT, 'zoom_rooms.display_top_banner'
DECLARE @Display_feedback_survey int
EXEC sp_OAMethod @jResp, 'BoolOf', @Display_feedback_survey OUT, 'zoom_rooms.display_feedback_survey'
DECLARE @Auto_direct_sharing int
EXEC sp_OAMethod @jResp, 'BoolOf', @Auto_direct_sharing OUT, 'zoom_rooms.auto_direct_sharing'
DECLARE @Transform_meeting_to_private int
EXEC sp_OAMethod @jResp, 'BoolOf', @Transform_meeting_to_private OUT, 'zoom_rooms.transform_meeting_to_private'
DECLARE @Hide_id_for_private_meeting int
EXEC sp_OAMethod @jResp, 'BoolOf', @Hide_id_for_private_meeting OUT, 'zoom_rooms.hide_id_for_private_meeting'
DECLARE @Auto_start_scheduled_meeting int
EXEC sp_OAMethod @jResp, 'BoolOf', @Auto_start_scheduled_meeting OUT, 'zoom_rooms.auto_start_scheduled_meeting'
DECLARE @Auto_stop_scheduled_meeting int
EXEC sp_OAMethod @jResp, 'BoolOf', @Auto_stop_scheduled_meeting OUT, 'zoom_rooms.auto_stop_scheduled_meeting'
DECLARE @Hide_share_instruction int
EXEC sp_OAMethod @jResp, 'BoolOf', @Hide_share_instruction OUT, 'zoom_rooms.hide_share_instruction'
DECLARE @Audio_device_daily_auto_test int
EXEC sp_OAMethod @jResp, 'BoolOf', @Audio_device_daily_auto_test OUT, 'zoom_rooms.audio_device_daily_auto_test'
DECLARE @Support_join_3rd_party_meeting int
EXEC sp_OAMethod @jResp, 'BoolOf', @Support_join_3rd_party_meeting OUT, 'zoom_rooms.support_join_3rd_party_meeting'
DECLARE @Encrypt_shared_screen_content int
EXEC sp_OAMethod @jResp, 'BoolOf', @Encrypt_shared_screen_content OUT, 'zoom_rooms.encrypt_shared_screen_content'
DECLARE @Allow_multiple_content_sharing int
EXEC sp_OAMethod @jResp, 'BoolOf', @Allow_multiple_content_sharing OUT, 'zoom_rooms.allow_multiple_content_sharing'
DECLARE @Show_non_video_participants int
EXEC sp_OAMethod @jResp, 'BoolOf', @Show_non_video_participants OUT, 'zoom_rooms.show_non_video_participants'
DECLARE @Show_call_history_in_room int
EXEC sp_OAMethod @jResp, 'BoolOf', @Show_call_history_in_room OUT, 'zoom_rooms.show_call_history_in_room'
DECLARE @Show_contact_list_on_controller int
EXEC sp_OAMethod @jResp, 'BoolOf', @Show_contact_list_on_controller OUT, 'zoom_rooms.show_contact_list_on_controller'
DECLARE @Count_attendees_number_in_room int
EXEC sp_OAMethod @jResp, 'BoolOf', @Count_attendees_number_in_room OUT, 'zoom_rooms.count_attendees_number_in_room'
DECLARE @Send_whiteboard_to_internal_contact_only int
EXEC sp_OAMethod @jResp, 'BoolOf', @Send_whiteboard_to_internal_contact_only OUT, 'zoom_rooms.send_whiteboard_to_internal_contact_only'
EXEC @hr = sp_OADestroy @http
EXEC @hr = sp_OADestroy @queryParams
EXEC @hr = sp_OADestroy @sbResponseBody
EXEC @hr = sp_OADestroy @jResp
END
GO
Curl Command
curl -G -d "setting_type=meeting"
-H "Authorization: Bearer <access_token>"
https://api.zoom.us/v2/rooms/:roomId/settings
Postman Collection Item JSON
{
"name": "Get Zoom Room settings",
"request": {
"auth": {
"type": "oauth2"
},
"method": "GET",
"header": [
],
"url": {
"raw": "{{baseUrl}}/rooms/:roomId/settings?setting_type=meeting",
"host": [
"{{baseUrl}}"
],
"path": [
"rooms",
":roomId",
"settings"
],
"query": [
{
"key": "setting_type",
"value": "meeting",
"description": "(Required) The type of setting that you would like to retrieve.<br> `alert`: Alert Settings applied on the Zoom Rooms Account.<br>\n`meeting`: Meeting settings of the Zoom Rooms Account."
}
],
"variable": [
{
"key": "roomId",
"value": "quis officia in reprehenderit",
"description": "(Required) Unique identifier of the Zoom Room."
}
]
},
"description": "Get information on meeting or alert settings applied to a specific Zoom Room. By default, only **Meeting Settings** are returned. To view only **Alert Settings**, specify `alert` 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:read:admin`\n \n **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Medium`<br> "
},
"response": [
{
"name": "**HTTP Status Code:** `200` **OK**<br>\nZoom Room settings returned successfully.",
"originalRequest": {
"method": "GET",
"header": [
{
"description": "Added as a part of security scheme: oauth2",
"key": "Authorization",
"value": "<token>"
}
],
"url": {
"raw": "{{baseUrl}}/rooms/:roomId/settings?setting_type=meeting",
"host": [
"{{baseUrl}}"
],
"path": [
"rooms",
":roomId",
"settings"
],
"query": [
{
"key": "setting_type",
"value": "meeting"
}
],
"variable": [
{
"key": "roomId",
"value": "quis officia in reprehenderit",
"description": "(Required) Unique identifier of the Zoom Room."
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"cookie": [
],
"body": "{\n \"zoom_rooms\": {\n \"upcoming_meeting_alert\": true,\n \"show_alert_before_meeting\": false,\n \"start_airplay_manually\": true,\n \"weekly_system_restart\": false,\n \"display_meeting_list\": false,\n \"display_top_banner\": false,\n \"display_feedback_survey\": true,\n \"auto_direct_sharing\": false,\n \"transform_meeting_to_private\": false,\n \"hide_id_for_private_meeting\": false,\n \"auto_start_scheduled_meeting\": true,\n \"auto_stop_scheduled_meeting\": true,\n \"hide_share_instruction\": true,\n \"audio_device_daily_auto_test\": true,\n \"support_join_3rd_party_meeting\": true,\n \"encrypt_shared_screen_content\": false,\n \"allow_multiple_content_sharing\": true,\n \"show_non_video_participants\": false,\n \"show_call_history_in_room\": true,\n \"show_contact_list_on_controller\": true,\n \"count_attendees_number_in_room\": true,\n \"send_whiteboard_to_internal_contact_only\": true\n }\n}"
},
{
"name": "**HTTP Status Code:** `400` **Bad Request**<br>\n\n**Error Code:** `200`<br>\nZoom Room subscription not found. Try again after purchasing a Zoom Room subscription.<br>\nAccess restricted.\n",
"originalRequest": {
"method": "GET",
"header": [
{
"description": "Added as a part of security scheme: oauth2",
"key": "Authorization",
"value": "<token>"
}
],
"url": {
"raw": "{{baseUrl}}/rooms/:roomId/settings?setting_type=meeting",
"host": [
"{{baseUrl}}"
],
"path": [
"rooms",
":roomId",
"settings"
],
"query": [
{
"key": "setting_type",
"value": "meeting"
}
],
"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": ""
},
{
"name": "**HTTP Status Code:** `404` **Not Found**<br>\n\n**Error Code:** `1012`<br>\nRoom not found:{roomId}.\n\n",
"originalRequest": {
"method": "GET",
"header": [
{
"description": "Added as a part of security scheme: oauth2",
"key": "Authorization",
"value": "<token>"
}
],
"url": {
"raw": "{{baseUrl}}/rooms/:roomId/settings?setting_type=meeting",
"host": [
"{{baseUrl}}"
],
"path": [
"rooms",
":roomId",
"settings"
],
"query": [
{
"key": "setting_type",
"value": "meeting"
}
],
"variable": [
{
"key": "roomId",
"value": "quis officia in reprehenderit",
"description": "(Required) Unique identifier of the Zoom Room."
}
]
}
},
"status": "Not Found",
"code": 404,
"_postman_previewlanguage": "text",
"header": [
{
"key": "Content-Type",
"value": "text/plain"
}
],
"cookie": [
],
"body": ""
}
]
}