Chilkat Online Tools

TCL / Zoom API / Delete user assistants

Back to Collection Items

load ./chilkat.dll

# This example assumes the Chilkat API to have been previously unlocked.
# See Global Unlock Sample for sample code.

set http [new_CkHttp]

# Adds the "Authorization: Bearer <access_token>" header.
CkHttp_put_AuthToken $http "<access_token>"

# resp is a CkHttpResponse
set resp [CkHttp_QuickRequest $http "DELETE" "https://api.zoom.us/v2/users/:userId/assistants"]
if {[CkHttp_get_LastMethodSuccess $http] == 0} then {
    puts [CkHttp_lastErrorText $http]
    delete_CkHttp $http
    exit
}

set respStatusCode [CkHttpResponse_get_StatusCode $resp]
puts "Response Status Code = $respStatusCode"
if {$respStatusCode != 204} then {
    puts "Response Header:"
    puts [CkHttpResponse_header $resp]
    puts "Response Body:"
    puts [CkHttpResponse_bodyStr $resp]
    puts "Failed."
    delete_CkHttpResponse $resp

    delete_CkHttp $http
    exit
}

delete_CkHttpResponse $resp

puts "Success."

delete_CkHttp $http

Curl Command

curl -X DELETE
	-H "Authorization: Bearer <access_token>"
https://api.zoom.us/v2/users/:userId/assistants

Postman Collection Item JSON

{
  "name": "Delete user assistants",
  "request": {
    "method": "DELETE",
    "header": [
    ],
    "url": {
      "raw": "{{baseUrl}}/users/:userId/assistants",
      "host": [
        "{{baseUrl}}"
      ],
      "path": [
        "users",
        ":userId",
        "assistants"
      ],
      "variable": [
        {
          "key": "userId",
          "value": "quis officia in reprehenderit",
          "description": "(Required) The user ID or email address of the user. For user-level apps, pass the `me` value for this parameter."
        }
      ]
    },
    "description": "Delete all assistants of the current user. For user-level apps, pass [the `me` value](https://marketplace.zoom.us/docs/api-reference/using-zoom-apis#mekeyword) instead of the `userId` parameter.\n\nAssistants are the users to whom the current user has assigned [scheduling privilege](https://support.zoom.us/hc/en-us/articles/201362803-Scheduling-Privilege). These assistants can schedule meeting on behalf of the current user as well as manage and act as an alternative host for all meetings if the admin has enabled [Co-host option](https://zoom.us/account/setting) on the account.\n\n**Scopes:** `user:write:admin`, `user:write`<br>**[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Light`\n\n**Prerequisites:** \n* The user as well as the assistant must have Licensed or an On-prem license.\n* Assistants must be under the current user's account."
  },
  "response": [
    {
      "name": "**HTTP Status Code:** `204` **No Content**<br>\nAssistants deleted.",
      "originalRequest": {
        "method": "DELETE",
        "header": [
          {
            "description": "Added as a part of security scheme: oauth2",
            "key": "Authorization",
            "value": "<token>"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/users/:userId/assistants",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "users",
            ":userId",
            "assistants"
          ],
          "variable": [
            {
              "key": "userId",
              "value": "quis officia in reprehenderit",
              "description": "(Required) The user ID or email address of the user. For user-level apps, pass the `me` value for this parameter."
            }
          ]
        }
      },
      "status": "No Content",
      "code": 204,
      "_postman_previewlanguage": "text",
      "header": [
        {
          "key": "Content-Type",
          "value": "text/plain"
        }
      ],
      "cookie": [
      ],
      "body": ""
    },
    {
      "name": "**HTTP Status Code:** `404` **Not Found**<br>\n**Error Code:** `1001`<br>\nUser does not exist: $userId.<br>",
      "originalRequest": {
        "method": "DELETE",
        "header": [
          {
            "description": "Added as a part of security scheme: oauth2",
            "key": "Authorization",
            "value": "<token>"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/users/:userId/assistants",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "users",
            ":userId",
            "assistants"
          ],
          "variable": [
            {
              "key": "userId",
              "value": "quis officia in reprehenderit",
              "description": "(Required) The user ID or email address of the user. For user-level apps, pass the `me` value for this parameter."
            }
          ]
        }
      },
      "status": "Not Found",
      "code": 404,
      "_postman_previewlanguage": "text",
      "header": [
        {
          "key": "Content-Type",
          "value": "text/plain"
        }
      ],
      "cookie": [
      ],
      "body": ""
    }
  ]
}