Chilkat Online Tools

Go / Zoom API / Update Zoom Room settings

Back to Collection Items

    // This example assumes the Chilkat API to have been previously unlocked.
    // See Global_Ref.html">Global Unlock Sample for sample code.

    http := chilkat.NewHttp()
    var success bool

    req := chilkat.NewHttpRequest()
    req.SetHttpVerb("PATCH")
    req.SetPath("/")
    req.SetContentType("multipart/form-data")

    jsonFormData1 := chilkat.NewJsonObject()
    jsonFormData1.UpdateBool("upcoming_meeting_alert",true)
    jsonFormData1.UpdateBool("show_alert_before_meeting",true)
    jsonFormData1.UpdateBool("start_airplay_mirroring",true)
    jsonFormData1.UpdateBool("start_airplay_manually",true)
    jsonFormData1.UpdateBool("weekly_system_restart",false)
    jsonFormData1.UpdateBool("display_meeting_list",false)
    jsonFormData1.UpdateBool("display_top_banner",true)
    jsonFormData1.UpdateBool("display_feedback_survey",true)
    jsonFormData1.UpdateBool("auto_direct_sharing",true)
    jsonFormData1.UpdateBool("transform_meeting_to_private",true)
    jsonFormData1.UpdateBool("hide_id_for_private_meeting",false)
    jsonFormData1.UpdateBool("auto_start_scheduled_meeting",true)
    jsonFormData1.UpdateBool("auto_stop_scheduled_meeting",false)
    jsonFormData1.UpdateBool("hide_share_instruction",false)
    jsonFormData1.UpdateBool("audio_device_daily_auto_test",false)
    jsonFormData1.UpdateBool("support_join_3rd_party_meeting",false)
    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("show_contact_list_on_controller",true)
    jsonFormData1.UpdateBool("count_attendees_number_in_room",true)
    jsonFormData1.UpdateBool("send_whiteboard_to_internal_contact_only",false)
    req.AddStringForUpload2("zoom_rooms","",jsonFormData1,"utf-8","application/json")

    jsonFormData2 := chilkat.NewJsonObject()
    jsonFormData2.UpdateBool("upcoming_meeting_alert",true)
    jsonFormData2.UpdateBool("show_alert_before_meeting",true)
    jsonFormData2.UpdateBool("start_airplay_mirroring",true)
    jsonFormData2.UpdateBool("start_airplay_manually",true)
    jsonFormData2.UpdateBool("weekly_system_restart",false)
    jsonFormData2.UpdateBool("display_meeting_list",false)
    jsonFormData2.UpdateBool("display_top_banner",true)
    jsonFormData2.UpdateBool("display_feedback_survey",true)
    jsonFormData2.UpdateBool("auto_direct_sharing",true)
    jsonFormData2.UpdateBool("transform_meeting_to_private",true)
    jsonFormData2.UpdateBool("hide_id_for_private_meeting",false)
    jsonFormData2.UpdateBool("auto_start_scheduled_meeting",true)
    jsonFormData2.UpdateBool("auto_stop_scheduled_meeting",false)
    jsonFormData2.UpdateBool("hide_share_instruction",false)
    jsonFormData2.UpdateBool("audio_device_daily_auto_test",false)
    jsonFormData2.UpdateBool("support_join_3rd_party_meeting",false)
    jsonFormData2.UpdateBool("encrypt_shared_screen_content",false)
    jsonFormData2.UpdateBool("allow_multiple_content_sharing",true)
    jsonFormData2.UpdateBool("show_non_video_participants",true)
    jsonFormData2.UpdateBool("show_call_history_in_room",false)
    jsonFormData2.UpdateBool("show_contact_list_on_controller",true)
    jsonFormData2.UpdateBool("count_attendees_number_in_room",true)
    jsonFormData2.UpdateBool("send_whiteboard_to_internal_contact_only",false)
    req.AddStringForUpload2("meeting_security","",jsonFormData2,"utf-8","application/json")

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

    resp := http.SynchronousRequest("reprehenderit",80,false,req)
    if http.LastMethodSuccess() == false {
        fmt.Println(http.LastErrorText())
        http.DisposeHttp()
        req.DisposeHttpRequest()
        jsonFormData1.DisposeJsonObject()
        jsonFormData2.DisposeJsonObject()
        return
    }

    sbResponseBody := chilkat.NewStringBuilder()
    resp.GetBodySb(sbResponseBody)

    jResp := chilkat.NewJsonObject()
    jResp.LoadSb(sbResponseBody)
    jResp.SetEmitCompact(false)

    fmt.Println("Response Body:")
    fmt.Println(*jResp.Emit())

    respStatusCode := resp.StatusCode()
    fmt.Println("Response Status Code = ", respStatusCode)
    if respStatusCode >= 400 {
        fmt.Println("Response Header:")
        fmt.Println(resp.Header())
        fmt.Println("Failed.")
        resp.DisposeHttpResponse()
        http.DisposeHttp()
        req.DisposeHttpRequest()
        jsonFormData1.DisposeJsonObject()
        jsonFormData2.DisposeJsonObject()
        sbResponseBody.DisposeStringBuilder()
        jResp.DisposeJsonObject()
        return
    }

    resp.DisposeHttpResponse()

    http.DisposeHttp()
    req.DisposeHttpRequest()
    jsonFormData1.DisposeJsonObject()
    jsonFormData2.DisposeJsonObject()
    sbResponseBody.DisposeStringBuilder()
    jResp.DisposeJsonObject()

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": ""
    }
  ]
}