VBScript / Zoom API / Unassign a role
Back to Collection Items
Dim fso, outFile
Set fso = CreateObject("Scripting.FileSystemObject")
'Create a Unicode (utf-16) output text file.
Set outFile = fso.CreateTextFile("output.txt", True, True)
' This example assumes the Chilkat API to have been previously unlocked.
' See Global Unlock Sample for sample code.
' For versions of Chilkat < 10.0.0, use CreateObject("Chilkat_9_5_0.Http")
set http = CreateObject("Chilkat.Http")
' Adds the "Authorization: Bearer <access_token>" header.
http.AuthToken = "<access_token>"
' resp is a Chilkat.HttpResponse
Set resp = http.QuickRequest("DELETE","https://api.zoom.us/v2/roles/:roleId/members/:memberId")
If (http.LastMethodSuccess = 0) Then
outFile.WriteLine(http.LastErrorText)
WScript.Quit
End If
respStatusCode = resp.StatusCode
outFile.WriteLine("Response Status Code = " & respStatusCode)
If (respStatusCode <> 204) Then
outFile.WriteLine("Response Header:")
outFile.WriteLine(resp.Header)
outFile.WriteLine("Response Body:")
outFile.WriteLine(resp.BodyStr)
outFile.WriteLine("Failed.")
WScript.Quit
End If
outFile.WriteLine("Success.")
outFile.Close
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": ""
}
]
}