Chilkat Online Tools

Ruby / Zoom API / Update Zoom Room account settings

Back to Collection Items

require 'chilkat'

# This example assumes the Chilkat API to have been previously unlocked.
# See Global Unlock Sample for sample code.

http = Chilkat::CkHttp.new()

req = Chilkat::CkHttpRequest.new()
req.put_HttpVerb("PATCH")
req.put_Path("/v2/rooms/account_settings?setting_type=meeting")
req.put_ContentType("multipart/form-data")

jsonFormData1 = Chilkat::CkJsonObject.new()
jsonFormData1.UpdateBool("upcoming_meeting_alert",false)
jsonFormData1.UpdateBool("show_alert_before_meeting",true)
jsonFormData1.UpdateBool("start_airplay_manually",false)
jsonFormData1.UpdateBool("weekly_system_restart",false)
jsonFormData1.UpdateBool("display_meeting_list",true)
jsonFormData1.UpdateBool("display_top_banner",false)
jsonFormData1.UpdateBool("display_feedback_survey",false)
jsonFormData1.UpdateBool("auto_direct_sharing",true)
jsonFormData1.UpdateBool("transform_meeting_to_private",true)
jsonFormData1.UpdateBool("hide_id_for_private_meeting",true)
jsonFormData1.UpdateBool("auto_start_scheduled_meeting",true)
jsonFormData1.UpdateBool("auto_stop_scheduled_meeting",true)
jsonFormData1.UpdateBool("audio_device_daily_auto_test",false)
jsonFormData1.UpdateBool("support_join_3rd_party_meeting",true)
jsonFormData1.UpdateBool("email_address_prompt_before_recording",true)
jsonFormData1.UpdateBool("secure_connection_channel",true)
jsonFormData1.UpdateBool("encrypt_shared_screen_content",false)
jsonFormData1.UpdateBool("allow_multiple_content_sharing",true)
jsonFormData1.UpdateBool("show_non_video_participants",true)
jsonFormData1.UpdateBool("show_call_history_in_room",false)
jsonFormData1.UpdateBool("make_room_alternative_host",true)
jsonFormData1.UpdateBool("show_contact_list_on_controller",true)
jsonFormData1.UpdateBool("count_attendees_number_in_room",true)
jsonFormData1.UpdateBool("send_whiteboard_to_internal_contact_only",true)
req.AddStringForUpload2("zoom_rooms","",jsonFormData1,"utf-8","application/json")

req.AddHeader("Authorization","Bearer <access_token>")

# resp is a CkHttpResponse
resp = http.SynchronousRequest("api.zoom.us",443,true,req)
if (http.get_LastMethodSuccess() == false)
    print http.lastErrorText() + "\n";
    exit
end

sbResponseBody = Chilkat::CkStringBuilder.new()
resp.GetBodySb(sbResponseBody)

jResp = Chilkat::CkJsonObject.new()
jResp.LoadSb(sbResponseBody)
jResp.put_EmitCompact(false)

print "Response Body:" + "\n";
print jResp.emit() + "\n";

respStatusCode = resp.get_StatusCode()
print "Response Status Code = " + respStatusCode.to_s() + "\n";
if (respStatusCode >= 400)
    print "Response Header:" + "\n";
    print resp.header() + "\n";
    print "Failed." + "\n";

    exit
end

Curl Command

curl -X PATCH
	-H "Authorization: Bearer <access_token>"
	-H "Content-Type: multipart/form-data"
	--form 'zoom_rooms={"upcoming_meeting_alert":false,"show_alert_before_meeting":true,"start_airplay_manually":false,"weekly_system_restart":false,"display_meeting_list":true,"display_top_banner":false,"display_feedback_survey":false,"auto_direct_sharing":true,"transform_meeting_to_private":true,"hide_id_for_private_meeting":true,"auto_start_scheduled_meeting":true,"auto_stop_scheduled_meeting":true,"audio_device_daily_auto_test":false,"support_join_3rd_party_meeting":true,"email_address_prompt_before_recording":true,"secure_connection_channel":true,"encrypt_shared_screen_content":false,"allow_multiple_content_sharing":true,"show_non_video_participants":true,"show_call_history_in_room":false,"make_room_alternative_host":true,"show_contact_list_on_controller":true,"count_attendees_number_in_room":true,"send_whiteboard_to_internal_contact_only":true}'
https://api.zoom.us/v2/rooms/account_settings?setting_type=meeting

Postman Collection Item JSON

{
  "name": "Update Zoom Room account 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\":false,\"show_alert_before_meeting\":true,\"start_airplay_manually\":false,\"weekly_system_restart\":false,\"display_meeting_list\":true,\"display_top_banner\":false,\"display_feedback_survey\":false,\"auto_direct_sharing\":true,\"transform_meeting_to_private\":true,\"hide_id_for_private_meeting\":true,\"auto_start_scheduled_meeting\":true,\"auto_stop_scheduled_meeting\":true,\"audio_device_daily_auto_test\":false,\"support_join_3rd_party_meeting\":true,\"email_address_prompt_before_recording\":true,\"secure_connection_channel\":true,\"encrypt_shared_screen_content\":false,\"allow_multiple_content_sharing\":true,\"show_non_video_participants\":true,\"show_call_history_in_room\":false,\"make_room_alternative_host\":true,\"show_contact_list_on_controller\":true,\"count_attendees_number_in_room\":true,\"send_whiteboard_to_internal_contact_only\":true}",
          "type": "text"
        }
      ]
    },
    "url": {
      "raw": "{{baseUrl}}/rooms/account_settings?setting_type=meeting",
      "host": [
        "{{baseUrl}}"
      ],
      "path": [
        "rooms",
        "account_settings"
      ],
      "query": [
        {
          "key": "setting_type",
          "value": "meeting",
          "description": "(Required) The type of setting that you would like to update.<br> `alert`: Alert Settings applied on the Zoom Rooms Account.<br>\n`meeting`: Meeting settings of the Zoom Rooms Account.<br>\n`signage`: View digital signage settings of the Zoom Rooms Account."
        }
      ]
    },
    "description": "Update account settings applied for Zoom Rooms in a Zoom account. With this API, you can update either the **Account Meeting Settings** or the **Alert Settings** (Client Alert Settings and Notfication Settings) of the Zoom Rooms account by specifying the required setting type in the `setting_type` parameter. To update only **Alert Settings**, specify `alert` as the value of the `setting_type` query parameter and to update only **Account Meeting Settings**, specify `meeting` as the value of the `setting_type` query parameter.<br><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\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.\n",
      "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\":false,\"show_alert_before_meeting\":true,\"start_airplay_manually\":false,\"weekly_system_restart\":false,\"display_meeting_list\":true,\"display_top_banner\":false,\"display_feedback_survey\":false,\"auto_direct_sharing\":true,\"transform_meeting_to_private\":true,\"hide_id_for_private_meeting\":true,\"auto_start_scheduled_meeting\":true,\"auto_stop_scheduled_meeting\":true,\"audio_device_daily_auto_test\":false,\"support_join_3rd_party_meeting\":true,\"email_address_prompt_before_recording\":true,\"secure_connection_channel\":true,\"encrypt_shared_screen_content\":false,\"allow_multiple_content_sharing\":true,\"show_non_video_participants\":true,\"show_call_history_in_room\":false,\"make_room_alternative_host\":true,\"show_contact_list_on_controller\":true,\"count_attendees_number_in_room\":true,\"send_whiteboard_to_internal_contact_only\":true}",
              "type": "text"
            }
          ]
        },
        "url": {
          "raw": "{{baseUrl}}/rooms/account_settings?setting_type=meeting",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "rooms",
            "account_settings"
          ],
          "query": [
            {
              "key": "setting_type",
              "value": "meeting"
            }
          ]
        }
      },
      "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\":false,\"show_alert_before_meeting\":true,\"start_airplay_manually\":false,\"weekly_system_restart\":false,\"display_meeting_list\":true,\"display_top_banner\":false,\"display_feedback_survey\":false,\"auto_direct_sharing\":true,\"transform_meeting_to_private\":true,\"hide_id_for_private_meeting\":true,\"auto_start_scheduled_meeting\":true,\"auto_stop_scheduled_meeting\":true,\"audio_device_daily_auto_test\":false,\"support_join_3rd_party_meeting\":true,\"email_address_prompt_before_recording\":true,\"secure_connection_channel\":true,\"encrypt_shared_screen_content\":false,\"allow_multiple_content_sharing\":true,\"show_non_video_participants\":true,\"show_call_history_in_room\":false,\"make_room_alternative_host\":true,\"show_contact_list_on_controller\":true,\"count_attendees_number_in_room\":true,\"send_whiteboard_to_internal_contact_only\":true}",
              "type": "text"
            }
          ]
        },
        "url": {
          "raw": "{{baseUrl}}/rooms/account_settings?setting_type=meeting",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "rooms",
            "account_settings"
          ],
          "query": [
            {
              "key": "setting_type",
              "value": "meeting"
            }
          ]
        }
      },
      "status": "Bad Request",
      "code": 400,
      "_postman_previewlanguage": "text",
      "header": [
        {
          "key": "Content-Type",
          "value": "text/plain"
        }
      ],
      "cookie": [
      ],
      "body": ""
    }
  ]
}