Foxpro / Zoom API / Unassign a role
Back to Collection Items
LOCAL loHttp
LOCAL lnSuccess
LOCAL loResp
LOCAL lnRespStatusCode
* 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')
loHttp = CreateObject('Chilkat.Http')
* Adds the "Authorization: Bearer <access_token>" header.
loHttp.AuthToken = "<access_token>"
loResp = loHttp.QuickRequest("DELETE","https://api.zoom.us/v2/roles/:roleId/members/:memberId")
IF (loHttp.LastMethodSuccess = 0) THEN
? loHttp.LastErrorText
RELEASE loHttp
CANCEL
ENDIF
lnRespStatusCode = loResp.StatusCode
? "Response Status Code = " + STR(lnRespStatusCode)
IF (lnRespStatusCode <> 204) THEN
? "Response Header:"
? loResp.Header
? "Response Body:"
? loResp.BodyStr
? "Failed."
RELEASE loResp
RELEASE loHttp
CANCEL
ENDIF
RELEASE loResp
? "Success."
RELEASE loHttp
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": ""
}
]
}