Android / Zoom API / Delete virtual background files
Back to Collection Items
// Important: Don't forget to include the call to System.loadLibrary
// as shown at the bottom of this code sample.
package com.test;
import android.app.Activity;
import com.chilkatsoft.*;
import android.widget.TextView;
import android.os.Bundle;
public class SimpleActivity extends Activity {
private static final String TAG = "Chilkat";
// Called when the activity is first created.
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
CkHttp http = new CkHttp();
boolean success;
// Adds the "Authorization: Bearer <access_token>" header.
http.put_AuthToken("<access_token>");
CkHttpResponse resp = http.QuickRequest("DELETE","reprehenderit");
if (http.get_LastMethodSuccess() == false) {
Log.i(TAG, http.lastErrorText());
return;
}
int respStatusCode = resp.get_StatusCode();
Log.i(TAG, "Response Status Code = " + String.valueOf(respStatusCode));
if (respStatusCode != 204) {
Log.i(TAG, "Response Header:");
Log.i(TAG, resp.header());
Log.i(TAG, "Response Body:");
Log.i(TAG, resp.bodyStr());
Log.i(TAG, "Failed.");
return;
}
Log.i(TAG, "Success.");
}
static {
System.loadLibrary("chilkat");
// Note: If the incorrect library name is passed to System.loadLibrary,
// then you will see the following error message at application startup:
//"The application <your-application-name> has stopped unexpectedly. Please try again."
}
}
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": ""
}
]
}