C++ / Zoom API / Delete a user assistant
Back to Collection Items
#include <CkHttp.h>
#include <CkHttpResponse.h>
void ChilkatSample(void)
{
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
CkHttp http;
bool success;
// Adds the "Authorization: Bearer <access_token>" header.
http.put_AuthToken("<access_token>");
CkHttpResponse *resp = http.QuickRequest("DELETE","https://api.zoom.us/v2/users/:userId/assistants/:assistantId");
if (http.get_LastMethodSuccess() == false) {
std::cout << http.lastErrorText() << "\r\n";
return;
}
int respStatusCode = resp->get_StatusCode();
std::cout << "Response Status Code = " << respStatusCode << "\r\n";
if (respStatusCode != 204) {
std::cout << "Response Header:" << "\r\n";
std::cout << resp->header() << "\r\n";
std::cout << "Response Body:" << "\r\n";
std::cout << resp->bodyStr() << "\r\n";
std::cout << "Failed." << "\r\n";
delete resp;
return;
}
delete resp;
std::cout << "Success." << "\r\n";
}
Curl Command
curl -X DELETE
-H "Authorization: Bearer <access_token>"
https://api.zoom.us/v2/users/:userId/assistants/:assistantId
Postman Collection Item JSON
{
"name": "Delete a user assistant",
"request": {
"method": "DELETE",
"header": [
],
"url": {
"raw": "{{baseUrl}}/users/:userId/assistants/:assistantId",
"host": [
"{{baseUrl}}"
],
"path": [
"users",
":userId",
"assistants",
":assistantId"
],
"variable": [
{
"key": "userId",
"value": "quis officia in reprehenderit",
"description": "(Required) The user ID or email address of the user. For user-level apps, pass the `me` value for this parameter."
},
{
"key": "assistantId",
"value": "quis officia in reprehenderit",
"description": "(Required) Assistant ID."
}
]
},
"description": "Delete a specific assistant of a user. 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\nAssistants are the users to whom the current user has assigned [scheduling privilege](https://support.zoom.us/hc/en-us/articles/201362803-Scheduling-Privilege). These assistants can schedule meeting on behalf of the current user as well as manage and act as an alternative host for all meetings if the admin has enabled [Co-host option](https://zoom.us/account/setting) on the account.\n\n**Scopes:** `user:write:admin`, `user:write`</br>**[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Light`\n\n**Prerequisites:** \n* The user as well as the assistant must have Licensed or an On-prem license.\n* Assistants must be under the current user's account."
},
"response": [
{
"name": "**HTTP Status Code:** `204` **OK**<br>\nAssistant deleted.",
"originalRequest": {
"method": "DELETE",
"header": [
{
"description": "Added as a part of security scheme: oauth2",
"key": "Authorization",
"value": "<token>"
}
],
"url": {
"raw": "{{baseUrl}}/users/:userId/assistants/:assistantId",
"host": [
"{{baseUrl}}"
],
"path": [
"users",
":userId",
"assistants",
":assistantId"
],
"variable": [
{
"key": "userId",
"value": "quis officia in reprehenderit",
"description": "(Required) The user ID or email address of the user. For user-level apps, pass the `me` value for this parameter."
},
{
"key": "assistantId",
"value": "quis officia in reprehenderit",
"description": "(Required) Assistant ID."
}
]
}
},
"status": "No Content",
"code": 204,
"_postman_previewlanguage": "text",
"header": [
{
"key": "Content-Type",
"value": "text/plain"
}
],
"cookie": [
],
"body": ""
},
{
"name": "**HTTP Status Code:** `404` **Not Found**<br><br>\n**Error Code:** `1001`<br>\nUser does not exist: $userId.\n",
"originalRequest": {
"method": "DELETE",
"header": [
{
"description": "Added as a part of security scheme: oauth2",
"key": "Authorization",
"value": "<token>"
}
],
"url": {
"raw": "{{baseUrl}}/users/:userId/assistants/:assistantId",
"host": [
"{{baseUrl}}"
],
"path": [
"users",
":userId",
"assistants",
":assistantId"
],
"variable": [
{
"key": "userId",
"value": "quis officia in reprehenderit",
"description": "(Required) The user ID or email address of the user. For user-level apps, pass the `me` value for this parameter."
},
{
"key": "assistantId",
"value": "quis officia in reprehenderit",
"description": "(Required) Assistant ID."
}
]
}
},
"status": "Not Found",
"code": 404,
"_postman_previewlanguage": "text",
"header": [
{
"key": "Content-Type",
"value": "text/plain"
}
],
"cookie": [
],
"body": ""
}
]
}