Chilkat Online Tools

C# / Zoom API / Delete virtual background files

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","reprehenderit");
if (http.LastMethodSuccess == false) {
    Debug.WriteLine(http.LastErrorText);
    return;
}

int respStatusCode = resp.StatusCode;
Debug.WriteLine("Response Status Code = " + Convert.ToString(respStatusCode));
if (respStatusCode != 204) {
    Debug.WriteLine("Response Header:");
    Debug.WriteLine(resp.Header);
    Debug.WriteLine("Response Body:");
    Debug.WriteLine(resp.BodyStr);
    Debug.WriteLine("Failed.");

    return;
}

Debug.WriteLine("Success.");

Curl Command

curl -X DELETE
	-H "Authorization: Bearer <access_token>"
https://api.zoom.us/v2/accounts/:accountId/settings/virtual_backgrounds?file_ids=quis officia in reprehenderit

Postman Collection Item JSON

{
  "name": "Delete virtual background files",
  "request": {
    "method": "DELETE",
    "header": [
    ],
    "url": {
      "raw": "{{baseUrl}}/accounts/:accountId/settings/virtual_backgrounds?file_ids=quis officia in reprehenderit",
      "host": [
        "{{baseUrl}}"
      ],
      "path": [
        "accounts",
        ":accountId",
        "settings",
        "virtual_backgrounds"
      ],
      "query": [
        {
          "key": "file_ids",
          "value": "quis officia in reprehenderit",
          "description": "Provide the id of the file that is to be deleted. To delete multiple files, provide comma separated values for this field."
        }
      ],
      "variable": [
        {
          "key": "accountId"
        }
      ]
    },
    "description": "Delete existing virtual background file(s) from an account. \n\n**Prerequisites:**<br>\n* Virtual background feature must be [enabled](https://support.zoom.us/hc/en-us/articles/210707503-Virtual-Background#h_2ef28080-fce9-4ac2-b567-dc958afab1b7) on the account.\n<br> **Scope:** `account:write:admin`<br> <br> \n**[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Light`<br>\n\n"
  },
  "response": [
    {
      "name": "**HTTP Status Code:** `204` **No Content** <br>\nDeleted.\n",
      "originalRequest": {
        "method": "DELETE",
        "header": [
          {
            "description": "Added as a part of security scheme: oauth2",
            "key": "Authorization",
            "value": "<token>"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/accounts/:accountId/settings/virtual_backgrounds?file_ids=quis officia in reprehenderit",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "accounts",
            ":accountId",
            "settings",
            "virtual_backgrounds"
          ],
          "query": [
            {
              "key": "file_ids",
              "value": "quis officia in reprehenderit"
            }
          ],
          "variable": [
            {
              "key": "accountId"
            }
          ]
        }
      },
      "status": "No Content",
      "code": 204,
      "_postman_previewlanguage": "text",
      "header": [
        {
          "key": "Content-Type",
          "value": "text/plain"
        }
      ],
      "cookie": [
      ],
      "body": ""
    },
    {
      "name": "**HTTP Status Code:** `400` **Bad request** <br>\n**Error Code:** `300`<br>\nInvalid parameter: file_ids.",
      "originalRequest": {
        "method": "DELETE",
        "header": [
          {
            "description": "Added as a part of security scheme: oauth2",
            "key": "Authorization",
            "value": "<token>"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/accounts/:accountId/settings/virtual_backgrounds?file_ids=quis officia in reprehenderit",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "accounts",
            ":accountId",
            "settings",
            "virtual_backgrounds"
          ],
          "query": [
            {
              "key": "file_ids",
              "value": "quis officia in reprehenderit"
            }
          ],
          "variable": [
            {
              "key": "accountId"
            }
          ]
        }
      },
      "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**Error Code:** `2001`<br>\nThis account does not exist or does not belong to you: {accountId}.",
      "originalRequest": {
        "method": "DELETE",
        "header": [
          {
            "description": "Added as a part of security scheme: oauth2",
            "key": "Authorization",
            "value": "<token>"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/accounts/:accountId/settings/virtual_backgrounds?file_ids=quis officia in reprehenderit",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "accounts",
            ":accountId",
            "settings",
            "virtual_backgrounds"
          ],
          "query": [
            {
              "key": "file_ids",
              "value": "quis officia in reprehenderit"
            }
          ],
          "variable": [
            {
              "key": "accountId"
            }
          ]
        }
      },
      "status": "Not Found",
      "code": 404,
      "_postman_previewlanguage": "text",
      "header": [
        {
          "key": "Content-Type",
          "value": "text/plain"
        }
      ],
      "cookie": [
      ],
      "body": ""
    }
  ]
}