Chilkat Online Tools

C# / Zoom API / Delete a Zoom Room

Back to Collection Items

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

Chilkat.Http http = new Chilkat.Http();
bool success;

// Adds the "Authorization: Bearer <access_token>" header.
http.AuthToken = "<access_token>";

Chilkat.HttpResponse resp = http.QuickRequest("DELETE","https://api.zoom.us/v2/rooms/:roomId");
if (http.LastMethodSuccess == false) {
    Debug.WriteLine(http.LastErrorText);
    return;
}

Chilkat.StringBuilder sbResponseBody = new Chilkat.StringBuilder();
resp.GetBodySb(sbResponseBody);

Chilkat.JsonObject jResp = new Chilkat.JsonObject();
jResp.LoadSb(sbResponseBody);
jResp.EmitCompact = false;

Debug.WriteLine("Response Body:");
Debug.WriteLine(jResp.Emit());

int respStatusCode = resp.StatusCode;
Debug.WriteLine("Response Status Code = " + Convert.ToString(respStatusCode));
if (respStatusCode >= 400) {
    Debug.WriteLine("Response Header:");
    Debug.WriteLine(resp.Header);
    Debug.WriteLine("Failed.");

    return;
}

Curl Command

curl -X DELETE
	-H "Authorization: Bearer <access_token>"
https://api.zoom.us/v2/rooms/:roomId

Postman Collection Item JSON

{
  "name": "Delete a Zoom Room",
  "request": {
    "auth": {
      "type": "oauth2"
    },
    "method": "DELETE",
    "header": [
    ],
    "url": {
      "raw": "{{baseUrl}}/rooms/:roomId",
      "host": [
        "{{baseUrl}}"
      ],
      "path": [
        "rooms",
        ":roomId"
      ],
      "variable": [
        {
          "key": "roomId",
          "value": "quis officia in reprehenderit",
          "description": "(Required) Unique Identifier of a Zoom Room."
        }
      ]
    },
    "description": "[Remove](https://support.zoom.us/hc/en-us/articles/360033432032-Zoom-Room-Device-Profiles#h_e55b2092-c418-4b02-819f-44de51448900) a specific Zoom Room profile from a Zoom account.<br><br>\n**Prerequisites:**<br>\n* Pro or a higher plan with [Zoom Room](https://zoom.us/zoomrooms) license.<br>\n**Scopes**: `room:write:admin`<br> \n **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Light`"
  },
  "response": [
    {
      "name": "**HTTP Status Code:** `204` **No Content** <br>\nZoom Room deleted successfully.\n",
      "originalRequest": {
        "method": "DELETE",
        "header": [
          {
            "description": "Added as a part of security scheme: oauth2",
            "key": "Authorization",
            "value": "<token>"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/rooms/:roomId",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "rooms",
            ":roomId"
          ],
          "variable": [
            {
              "key": "roomId",
              "value": "quis officia in reprehenderit",
              "description": "(Required) Unique Identifier of a 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.<br>\n\n\n\n",
      "originalRequest": {
        "method": "DELETE",
        "header": [
          {
            "description": "Added as a part of security scheme: oauth2",
            "key": "Authorization",
            "value": "<token>"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/rooms/:roomId",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "rooms",
            ":roomId"
          ],
          "variable": [
            {
              "key": "roomId",
              "value": "quis officia in reprehenderit",
              "description": "(Required) Unique Identifier of a 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><br>\n**Error Code:** `1012`<br>\nRoom not found:{roomId}",
      "originalRequest": {
        "method": "DELETE",
        "header": [
          {
            "description": "Added as a part of security scheme: oauth2",
            "key": "Authorization",
            "value": "<token>"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/rooms/:roomId",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "rooms",
            ":roomId"
          ],
          "variable": [
            {
              "key": "roomId",
              "value": "quis officia in reprehenderit",
              "description": "(Required) Unique Identifier of a Zoom Room."
            }
          ]
        }
      },
      "status": "Not Found",
      "code": 404,
      "_postman_previewlanguage": "text",
      "header": [
        {
          "key": "Content-Type",
          "value": "text/plain"
        }
      ],
      "cookie": [
      ],
      "body": ""
    }
  ]
}