autoit / Zoom API / Unassign a role
Back to Collection Items
; This example assumes the Chilkat API to have been previously unlocked.
; See Global Unlock Sample for sample code.
$oHttp = ObjCreate("Chilkat.Http")
Local $bSuccess
; Adds the "Authorization: Bearer <access_token>" header.
$oHttp.AuthToken = "<access_token>"
Local $oResp = $oHttp.QuickRequest("DELETE","https://api.zoom.us/v2/roles/:roleId/members/:memberId")
If ($oHttp.LastMethodSuccess = False) Then
ConsoleWrite($oHttp.LastErrorText & @CRLF)
Exit
EndIf
Local $iRespStatusCode = $oResp.StatusCode
ConsoleWrite("Response Status Code = " & $iRespStatusCode & @CRLF)
If ($iRespStatusCode <> 204) Then
ConsoleWrite("Response Header:" & @CRLF)
ConsoleWrite($oResp.Header & @CRLF)
ConsoleWrite("Response Body:" & @CRLF)
ConsoleWrite($oResp.BodyStr & @CRLF)
ConsoleWrite("Failed." & @CRLF)
Exit
EndIf
ConsoleWrite("Success." & @CRLF)
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": ""
}
]
}