Chilkat Online Tools

DataFlex / Zoom API / Delete virtual background files

Back to Collection Items

Use ChilkatAx-9.5.0-win32.pkg

Procedure Test
    Handle hoHttp
    Boolean iSuccess
    Variant vResp
    Handle hoResp
    Integer iRespStatusCode
    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

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

    Get ComQuickRequest Of hoHttp "DELETE" "reprehenderit" 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 ComStatusCode Of hoResp To iRespStatusCode
    Showln "Response Status Code = " iRespStatusCode
    If (iRespStatusCode <> 204) Begin
        Showln "Response Header:"
        Get ComHeader Of hoResp To sTemp1
        Showln sTemp1
        Showln "Response Body:"
        Get ComBodyStr Of hoResp To sTemp1
        Showln sTemp1
        Showln "Failed."
        Send Destroy of hoResp
        Procedure_Return
    End

    Send Destroy of hoResp
    Showln "Success."


End_Procedure

Curl Command

curl -X DELETE
	-H "Authorization: Bearer <access_token>"
https://api.zoom.us/v2/users/:userId/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}}/users/:userId/settings/virtual_backgrounds?file_ids=quis officia in reprehenderit",
      "host": [
        "{{baseUrl}}"
      ],
      "path": [
        "users",
        ":userId",
        "settings",
        "virtual_backgrounds"
      ],
      "query": [
        {
          "key": "file_ids",
          "value": "quis officia in reprehenderit",
          "description": "A comma-seprated list of the virtual background file IDs to delete."
        }
      ],
      "variable": [
        {
          "key": "userId",
          "value": "quis officia in reprehenderit",
          "description": "(Required) The user's ID. To get a user's ID, use the [**List users**](https://marketplace.zoom.us/docs/api-reference/zoom-api/users/users) API. For user-level apps, pass the `me` value instead of the user ID value."
        }
      ]
    },
    "description": "Use this API to delete a user's virtual background files. For user-level apps, pass [the `me` value](https://marketplace.zoom.us/docs/api-reference/using-zoom-apis#mekeyword) instead of the `userId` parameter. \n\n**Scopes:** `user:write`, `user:write:admin` <br >**[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Light` \n\n**Prerequisites:** \n* The [**Virtual Background**](https://support.zoom.us/hc/en-us/articles/210707503-Virtual-Background#h_2ef28080-fce9-4ac2-b567-dc958afab1b7) feature must be enabled on the account."
  },
  "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}}/users/:userId/settings/virtual_backgrounds?file_ids=quis officia in reprehenderit",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "users",
            ":userId",
            "settings",
            "virtual_backgrounds"
          ],
          "query": [
            {
              "key": "file_ids",
              "value": "quis officia in reprehenderit"
            }
          ],
          "variable": [
            {
              "key": "userId",
              "value": "quis officia in reprehenderit",
              "description": "(Required) The user's ID. To get a user's ID, use the [**List users**](https://marketplace.zoom.us/docs/api-reference/zoom-api/users/users) API. For user-level apps, pass the `me` value instead of the user ID value."
            }
          ]
        }
      },
      "status": "No Content",
      "code": 204,
      "_postman_previewlanguage": "text",
      "header": [
        {
          "key": "Content-Type",
          "value": "text/plain"
        }
      ],
      "cookie": [
      ],
      "body": ""
    },
    {
      "name": "**HTTP Status Code:** `400` **Bad Request** \n\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}}/users/:userId/settings/virtual_backgrounds?file_ids=quis officia in reprehenderit",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "users",
            ":userId",
            "settings",
            "virtual_backgrounds"
          ],
          "query": [
            {
              "key": "file_ids",
              "value": "quis officia in reprehenderit"
            }
          ],
          "variable": [
            {
              "key": "userId",
              "value": "quis officia in reprehenderit",
              "description": "(Required) The user's ID. To get a user's ID, use the [**List users**](https://marketplace.zoom.us/docs/api-reference/zoom-api/users/users) API. For user-level apps, pass the `me` value instead of the user ID value."
            }
          ]
        }
      },
      "status": "Bad Request",
      "code": 400,
      "_postman_previewlanguage": "text",
      "header": [
        {
          "key": "Content-Type",
          "value": "text/plain"
        }
      ],
      "cookie": [
      ],
      "body": ""
    },
    {
      "name": "**HTTP Status Code:** `404` **Not Found** \n\n**Error Code:** `1001` <br>\nUser not exist. <br>\nUser {userId} does not exist or does not belong to this account.",
      "originalRequest": {
        "method": "DELETE",
        "header": [
          {
            "description": "Added as a part of security scheme: oauth2",
            "key": "Authorization",
            "value": "<token>"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/users/:userId/settings/virtual_backgrounds?file_ids=quis officia in reprehenderit",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "users",
            ":userId",
            "settings",
            "virtual_backgrounds"
          ],
          "query": [
            {
              "key": "file_ids",
              "value": "quis officia in reprehenderit"
            }
          ],
          "variable": [
            {
              "key": "userId",
              "value": "quis officia in reprehenderit",
              "description": "(Required) The user's ID. To get a user's ID, use the [**List users**](https://marketplace.zoom.us/docs/api-reference/zoom-api/users/users) API. For user-level apps, pass the `me` value instead of the user ID value."
            }
          ]
        }
      },
      "status": "Not Found",
      "code": 404,
      "_postman_previewlanguage": "text",
      "header": [
        {
          "key": "Content-Type",
          "value": "text/plain"
        }
      ],
      "cookie": [
      ],
      "body": ""
    }
  ]
}