delphiAx / Zoom API / Unassign a role
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/roles/:roleId/members/:memberId');
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/roles/:roleId/members/:memberId
Postman Collection Item JSON
{
"name": "Unassign a role",
"request": {
"auth": {
"type": "oauth2"
},
"method": "DELETE",
"header": [
],
"url": {
"raw": "{{baseUrl}}/roles/:roleId/members/:memberId",
"host": [
"{{baseUrl}}"
],
"path": [
"roles",
":roleId",
"members",
":memberId"
],
"variable": [
{
"key": "roleId",
"value": "quis officia in reprehenderit",
"description": "(Required) The role ID"
},
{
"key": "memberId",
"value": "quis officia in reprehenderit",
"description": "(Required) Member's ID"
}
]
},
"description": "User [roles](https://support.zoom.us/hc/en-us/articles/115001078646-Role-Based-Access-Control) can have a set of permissions that allows access only to the pages a user needs to view or edit. Use this API to unassign a user's role.\n\n**Scope:** `role:write:admin`<br>\n \n **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Light`<br>\n**Prerequisites:**<br>\n* A Pro or a higher plan."
},
"response": [
{
"name": "**HTTP Status Code:** `204`<br>\nRole withdrawn from user.",
"originalRequest": {
"method": "DELETE",
"header": [
{
"description": "Added as a part of security scheme: oauth2",
"key": "Authorization",
"value": "<token>"
}
],
"url": {
"raw": "{{baseUrl}}/roles/:roleId/members/:memberId",
"host": [
"{{baseUrl}}"
],
"path": [
"roles",
":roleId",
"members",
":memberId"
],
"variable": [
{
"key": "roleId",
"value": "quis officia in reprehenderit",
"description": "(Required) The role ID"
},
{
"key": "memberId",
"value": "quis officia in reprehenderit",
"description": "(Required) Member's ID"
}
]
}
},
"status": "No Content",
"code": 204,
"_postman_previewlanguage": "text",
"header": [
{
"key": "Content-Type",
"value": "text/plain"
}
],
"cookie": [
],
"body": ""
},
{
"name": "**HTTP Status Code:** `404`<br>Role or Member not found",
"originalRequest": {
"method": "DELETE",
"header": [
{
"description": "Added as a part of security scheme: oauth2",
"key": "Authorization",
"value": "<token>"
}
],
"url": {
"raw": "{{baseUrl}}/roles/:roleId/members/:memberId",
"host": [
"{{baseUrl}}"
],
"path": [
"roles",
":roleId",
"members",
":memberId"
],
"variable": [
{
"key": "roleId",
"value": "quis officia in reprehenderit",
"description": "(Required) The role ID"
},
{
"key": "memberId",
"value": "quis officia in reprehenderit",
"description": "(Required) Member's ID"
}
]
}
},
"status": "Not Found",
"code": 404,
"_postman_previewlanguage": "text",
"header": [
{
"key": "Content-Type",
"value": "text/plain"
}
],
"cookie": [
],
"body": ""
}
]
}