Chilkat Online Tools

VB.NET / Zoom API / List user schedulers

Back to Collection Items

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

Dim http As New Chilkat.Http
Dim success As Boolean

' Adds the "Authorization: Bearer <access_token>" header.
http.AuthToken = "<access_token>"

Dim sbResponseBody As New Chilkat.StringBuilder
success = http.QuickGetSb("https://api.zoom.us/v2/users/:userId/schedulers",sbResponseBody)
If (success = False) Then
    Debug.WriteLine(http.LastErrorText)
    Exit Sub
End If


Dim jResp As New Chilkat.JsonObject
jResp.LoadSb(sbResponseBody)
jResp.EmitCompact = False

Debug.WriteLine("Response Body:")
Debug.WriteLine(jResp.Emit())

Dim respStatusCode As Integer = http.LastStatus
Debug.WriteLine("Response Status Code = " & respStatusCode)
If (respStatusCode >= 400) Then
    Debug.WriteLine("Response Header:")
    Debug.WriteLine(http.LastHeader)
    Debug.WriteLine("Failed.")
    Exit Sub
End If


' Sample JSON response:
' (Sample code for parsing the JSON response is shown below)

' {
'   "schedulers": [
'     {
'       "id": "abXXXsfsidfhjdsfhd768944",
'       "email": "example@example.com"
'     },
'     {
'       "id": "abXXbbbbioepur8944",
'       "email": "example-2@example.com"
'     }
'   ]
' }

' Sample code for parsing the JSON response...
' Use this online tool to generate parsing code from sample JSON: Generate JSON Parsing Code



Dim id As String
Dim email As String

Dim i As Integer = 0
Dim count_i As Integer = jResp.SizeOfArray("schedulers")
While i < count_i
    jResp.I = i
    id = jResp.StringOf("schedulers[i].id")
    email = jResp.StringOf("schedulers[i].email")
    i = i + 1
End While

Curl Command

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

Postman Collection Item JSON

{
  "name": "List user schedulers",
  "request": {
    "auth": {
      "type": "oauth2"
    },
    "method": "GET",
    "header": [
    ],
    "url": {
      "raw": "{{baseUrl}}/users/:userId/schedulers",
      "host": [
        "{{baseUrl}}"
      ],
      "path": [
        "users",
        ":userId",
        "schedulers"
      ],
      "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": "List all the schedulers of a 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\nSchedulers in this context are the users for whom the current user can schedule meetings for. For example, if the current user (the user whose `userId` was passed in the `path` parameter) is \"user A\", the response of this API will contain a list of user(s), for whom user A can schedule and manage meetings. User A is the assistant of these users and thus has scheduling privilege for these user(s).\n\n**Scopes:** `user:read:admin`, `user:read`<br>**[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Medium`\n\n**Prerequisites:** \n* Current user must be under the same account as the scheduler."
  },
  "response": [
    {
      "name": "**HTTP Status Code:** `200`<br>Successfully listed all schedulers of the user.",
      "originalRequest": {
        "method": "GET",
        "header": [
          {
            "description": "Added as a part of security scheme: oauth2",
            "key": "Authorization",
            "value": "<token>"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/users/:userId/schedulers",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "users",
            ":userId",
            "schedulers"
          ],
          "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": "OK",
      "code": 200,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "{\n \"schedulers\": [\n  {\n   \"id\": \"abXXXsfsidfhjdsfhd768944\",\n   \"email\": \"example@example.com\"\n  },\n  {\n   \"id\": \"abXXbbbbioepur8944\",\n   \"email\": \"example-2@example.com\"\n  }\n ]\n}"
    },
    {
      "name": "**HTTP Status Code:** `404` **Not Found**<br><br>\n**Error Code:** `1001`<br>\nUser does not exist: $userId.\n",
      "originalRequest": {
        "method": "GET",
        "header": [
          {
            "description": "Added as a part of security scheme: oauth2",
            "key": "Authorization",
            "value": "<token>"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/users/:userId/schedulers",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "users",
            ":userId",
            "schedulers"
          ],
          "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": ""
    }
  ]
}