Chilkat Online Tools

DataFlex / Zoom API / Get Zoom Room account settings

Back to Collection Items

Use ChilkatAx-win32.pkg

Procedure Test
    Handle hoHttp
    Boolean iSuccess
    Variant vQueryParams
    Handle hoQueryParams
    Variant vResp
    Handle hoResp
    Variant vSbResponseBody
    Handle hoSbResponseBody
    Handle hoJResp
    Integer iRespStatusCode
    Boolean iDetect_microphone_error_alert
    Boolean iDetect_bluetooth_microphone_error_alert
    Boolean iDetect_speaker_error_alert
    Boolean iDetect_bluetooth_speaker_error_alert
    Boolean iDetect_camera_error_alert
    Boolean iAudio_not_meet_usability_threshold
    Boolean iBattery_low_and_not_charging
    Boolean iController_scheduling_disconnected
    Boolean iCpu_usage_high_detected
    Boolean iNetwork_unstable_detected
    Boolean iZoom_room_offline
    Boolean iSip_registration_failed
    Boolean iMic_speaker_camera_disconnected
    Boolean iZoom_room_display_disconnected
    String sTemp1
    Boolean bTemp1

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

    Get Create (RefClass(cComChilkatHttp)) To hoHttp
    If (Not(IsComObjectCreated(hoHttp))) Begin
        Send CreateComObject of hoHttp
    End

    Get Create (RefClass(cComChilkatJsonObject)) To hoQueryParams
    If (Not(IsComObjectCreated(hoQueryParams))) Begin
        Send CreateComObject of hoQueryParams
    End
    Get ComUpdateString Of hoQueryParams "setting_type" "meeting" To iSuccess

    // Adds the "Authorization: Bearer <access_token>" header.
    Set ComAuthToken Of hoHttp To "<access_token>"

    Get pvComObject of hoQueryParams to vQueryParams
    Get ComQuickRequestParams Of hoHttp "GET" "https://api.zoom.us/v2/rooms/account_settings" vQueryParams To vResp
    If (IsComObject(vResp)) Begin
        Get Create (RefClass(cComChilkatHttpResponse)) To hoResp
        Set pvComObject Of hoResp To vResp
    End
    Get ComLastMethodSuccess Of hoHttp To bTemp1
    If (bTemp1 = False) Begin
        Get ComLastErrorText Of hoHttp To sTemp1
        Showln sTemp1
        Procedure_Return
    End

    Get Create (RefClass(cComChilkatStringBuilder)) To hoSbResponseBody
    If (Not(IsComObjectCreated(hoSbResponseBody))) Begin
        Send CreateComObject of hoSbResponseBody
    End
    Get pvComObject of hoSbResponseBody to vSbResponseBody
    Get ComGetBodySb Of hoResp vSbResponseBody To iSuccess

    Get Create (RefClass(cComChilkatJsonObject)) To hoJResp
    If (Not(IsComObjectCreated(hoJResp))) Begin
        Send CreateComObject of hoJResp
    End
    Get pvComObject of hoSbResponseBody to vSbResponseBody
    Get ComLoadSb Of hoJResp vSbResponseBody To iSuccess
    Set ComEmitCompact Of hoJResp To False

    Showln "Response Body:"
    Get ComEmit Of hoJResp To sTemp1
    Showln sTemp1

    Get ComStatusCode Of hoResp To iRespStatusCode
    Showln "Response Status Code = " iRespStatusCode
    If (iRespStatusCode >= 400) Begin
        Showln "Response Header:"
        Get ComHeader Of hoResp To sTemp1
        Showln sTemp1
        Showln "Failed."
        Send Destroy of hoResp
        Procedure_Return
    End

    Send Destroy of hoResp

    // Sample JSON response:
    // (Sample code for parsing the JSON response is shown below)

    // {
    //   "client_alert": {
    //     "detect_microphone_error_alert": true,
    //     "detect_bluetooth_microphone_error_alert": true,
    //     "detect_speaker_error_alert": true,
    //     "detect_bluetooth_speaker_error_alert": true,
    //     "detect_camera_error_alert": true
    //   },
    //   "notification": {
    //     "audio_not_meet_usability_threshold": false,
    //     "battery_low_and_not_charging": false,
    //     "controller_scheduling_disconnected": false,
    //     "cpu_usage_high_detected": false,
    //     "network_unstable_detected": false,
    //     "zoom_room_offline": false,
    //     "sip_registration_failed": false,
    //     "mic_speaker_camera_disconnected": false,
    //     "zoom_room_display_disconnected": false
    //   }
    // }

    // Sample code for parsing the JSON response...
    // Use this online tool to generate parsing code from sample JSON: Generate JSON Parsing Code

    Get ComBoolOf Of hoJResp "client_alert.detect_microphone_error_alert" To iDetect_microphone_error_alert
    Get ComBoolOf Of hoJResp "client_alert.detect_bluetooth_microphone_error_alert" To iDetect_bluetooth_microphone_error_alert
    Get ComBoolOf Of hoJResp "client_alert.detect_speaker_error_alert" To iDetect_speaker_error_alert
    Get ComBoolOf Of hoJResp "client_alert.detect_bluetooth_speaker_error_alert" To iDetect_bluetooth_speaker_error_alert
    Get ComBoolOf Of hoJResp "client_alert.detect_camera_error_alert" To iDetect_camera_error_alert
    Get ComBoolOf Of hoJResp "notification.audio_not_meet_usability_threshold" To iAudio_not_meet_usability_threshold
    Get ComBoolOf Of hoJResp "notification.battery_low_and_not_charging" To iBattery_low_and_not_charging
    Get ComBoolOf Of hoJResp "notification.controller_scheduling_disconnected" To iController_scheduling_disconnected
    Get ComBoolOf Of hoJResp "notification.cpu_usage_high_detected" To iCpu_usage_high_detected
    Get ComBoolOf Of hoJResp "notification.network_unstable_detected" To iNetwork_unstable_detected
    Get ComBoolOf Of hoJResp "notification.zoom_room_offline" To iZoom_room_offline
    Get ComBoolOf Of hoJResp "notification.sip_registration_failed" To iSip_registration_failed
    Get ComBoolOf Of hoJResp "notification.mic_speaker_camera_disconnected" To iMic_speaker_camera_disconnected
    Get ComBoolOf Of hoJResp "notification.zoom_room_display_disconnected" To iZoom_room_display_disconnected


End_Procedure

Curl Command

curl -G -d "setting_type=meeting"
	-H "Authorization: Bearer <access_token>"
https://api.zoom.us/v2/rooms/account_settings

Postman Collection Item JSON

{
  "name": "Get Zoom Room account settings",
  "request": {
    "auth": {
      "type": "oauth2"
    },
    "method": "GET",
    "header": [
    ],
    "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 retrieve.<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": "Get details on Account Settings of a Zoom Room. With this API, you can view either the **Account Meeting Settings** or the **Alert Settings** (Client Alert Settings and Notfication Settings) of the Zoom Rooms account. By default, only **Account Meeting Settings** are returned. To view only **Alert Settings**, specify `alert` 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:read:admin`<br><br> \n \n **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Medium`"
  },
  "response": [
    {
      "name": "**HTTP Status Code:** `200` **OK**<br>\nZR Account Settings returned successfully.\n",
      "originalRequest": {
        "method": "GET",
        "header": [
          {
            "description": "Added as a part of security scheme: oauth2",
            "key": "Authorization",
            "value": "<token>"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/rooms/account_settings?setting_type=meeting",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "rooms",
            "account_settings"
          ],
          "query": [
            {
              "key": "setting_type",
              "value": "meeting"
            }
          ]
        }
      },
      "status": "OK",
      "code": 200,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "{\n \"client_alert\": {\n  \"detect_microphone_error_alert\": true,\n  \"detect_bluetooth_microphone_error_alert\": true,\n  \"detect_speaker_error_alert\": true,\n  \"detect_bluetooth_speaker_error_alert\": true,\n  \"detect_camera_error_alert\": true\n },\n \"notification\": {\n  \"audio_not_meet_usability_threshold\": false,\n  \"battery_low_and_not_charging\": false,\n  \"controller_scheduling_disconnected\": false,\n  \"cpu_usage_high_detected\": false,\n  \"network_unstable_detected\": false,\n  \"zoom_room_offline\": false,\n  \"sip_registration_failed\": false,\n  \"mic_speaker_camera_disconnected\": false,\n  \"zoom_room_display_disconnected\": false\n }\n}"
    },
    {
      "name": "**HTTP Status Code:** `400` **Bad Request**<br>\n**Error Code:** `200`<br>\nZoom Room subscription not found. Try again after purchasing a Zoom Room subscription.<br>\nAccess restricted.",
      "originalRequest": {
        "method": "GET",
        "header": [
          {
            "description": "Added as a part of security scheme: oauth2",
            "key": "Authorization",
            "value": "<token>"
          }
        ],
        "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": ""
    }
  ]
}