delphiAx / Zoom API / Delete an IM directory group
Back to Collection Items
var
http: TChilkatHttp;
success: Integer;
resp: IChilkatHttpResponse;
respStatusCode: Integer;
begin
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
http := TChilkatHttp.Create(Self);
// Adds the "Authorization: Bearer <access_token>" header.
http.AuthToken := '<access_token>';
resp := http.QuickRequest('DELETE','https://api.zoom.us/v2/im/groups/:groupId');
if (http.LastMethodSuccess = 0) then
begin
Memo1.Lines.Add(http.LastErrorText);
Exit;
end;
respStatusCode := resp.StatusCode;
Memo1.Lines.Add('Response Status Code = ' + IntToStr(respStatusCode));
if (respStatusCode <> 204) then
begin
Memo1.Lines.Add('Response Header:');
Memo1.Lines.Add(resp.Header);
Memo1.Lines.Add('Response Body:');
Memo1.Lines.Add(resp.BodyStr);
Memo1.Lines.Add('Failed.');
Exit;
end;
Memo1.Lines.Add('Success.');
Curl Command
curl -X DELETE
-H "Authorization: Bearer <access_token>"
https://api.zoom.us/v2/im/groups/:groupId
Postman Collection Item JSON
{
"name": "Delete an IM directory group",
"request": {
"method": "DELETE",
"header": [
],
"url": {
"raw": "{{baseUrl}}/im/groups/:groupId",
"host": [
"{{baseUrl}}"
],
"path": [
"im",
"groups",
":groupId"
],
"variable": [
{
"key": "groupId",
"value": "quis officia in reprehenderit",
"description": "(Required) The group ID.<br>\nCan be retrieved by calling [GET /groups](https://marketplace.zoom.us/docs/api-reference/zoom-api/groups/groups)."
}
]
},
"description": "Delete an [IM directory group](https://support.zoom.us/hc/en-us/articles/203749815-IM-Management) under your account.<br><br>\nScopes: `imgroup:write:admin`<br>\n \n **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Light`"
},
"response": [
{
"name": "**HTTP Status Code:** `204` <br>\nIM group deleted.\n\n",
"originalRequest": {
"method": "DELETE",
"header": [
{
"description": "Added as a part of security scheme: oauth2",
"key": "Authorization",
"value": "<token>"
}
],
"url": {
"raw": "{{baseUrl}}/im/groups/:groupId",
"host": [
"{{baseUrl}}"
],
"path": [
"im",
"groups",
":groupId"
],
"variable": [
{
"key": "groupId",
"value": "quis officia in reprehenderit",
"description": "(Required) The group ID.<br>\nCan be retrieved by calling [GET /groups](https://marketplace.zoom.us/docs/api-reference/zoom-api/groups/groups)."
}
]
}
},
"status": "No Content",
"code": 204,
"_postman_previewlanguage": "text",
"header": [
{
"key": "Content-Type",
"value": "text/plain"
}
],
"cookie": [
],
"body": ""
},
{
"name": "**Error Code:** `300` <br>\nMissing field: name.",
"originalRequest": {
"method": "DELETE",
"header": [
{
"description": "Added as a part of security scheme: oauth2",
"key": "Authorization",
"value": "<token>"
}
],
"url": {
"raw": "{{baseUrl}}/im/groups/:groupId",
"host": [
"{{baseUrl}}"
],
"path": [
"im",
"groups",
":groupId"
],
"variable": [
{
"key": "groupId",
"value": "quis officia in reprehenderit",
"description": "(Required) The group ID.<br>\nCan be retrieved by calling [GET /groups](https://marketplace.zoom.us/docs/api-reference/zoom-api/groups/groups)."
}
]
}
},
"status": "Multiple Choices",
"code": 300,
"_postman_previewlanguage": "text",
"header": [
{
"key": "Content-Type",
"value": "text/plain"
}
],
"cookie": [
],
"body": ""
},
{
"name": "**HTTP Status Code:** `404` <br>\nIM Group not found.\n**Error Code:** `4130` <br>\nGroup does not exist:{groupId}.",
"originalRequest": {
"method": "DELETE",
"header": [
{
"description": "Added as a part of security scheme: oauth2",
"key": "Authorization",
"value": "<token>"
}
],
"url": {
"raw": "{{baseUrl}}/im/groups/:groupId",
"host": [
"{{baseUrl}}"
],
"path": [
"im",
"groups",
":groupId"
],
"variable": [
{
"key": "groupId",
"value": "quis officia in reprehenderit",
"description": "(Required) The group ID.<br>\nCan be retrieved by calling [GET /groups](https://marketplace.zoom.us/docs/api-reference/zoom-api/groups/groups)."
}
]
}
},
"status": "Not Found",
"code": 404,
"_postman_previewlanguage": "text",
"header": [
{
"key": "Content-Type",
"value": "text/plain"
}
],
"cookie": [
],
"body": ""
}
]
}