Chilkat Online Tools

TCL / Zoom API / Add panelists

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]

set req [new_CkHttpRequest]

CkHttpRequest_put_HttpVerb $req "POST"
CkHttpRequest_put_Path $req "/v2/webinars/:webinarId/panelists"
CkHttpRequest_put_ContentType $req "multipart/form-data"

set jsonFormData1 [new_CkJsonArray]

CkJsonArray_AddObjectAt $jsonFormData1 -1
# jsonObj_1 is a CkJsonObject
set jsonObj_1 [CkJsonArray_ObjectAt $jsonFormData1 [expr [CkJsonArray_get_Size $jsonFormData1] - 1]]
CkJsonObject_UpdateString $jsonObj_1 "name" "incididunt"
CkJsonObject_UpdateString $jsonObj_1 "email" "1dvyCMDpuLjN5@IcXOmWxXXsharB.zm"
delete_CkJsonObject $jsonObj_1

CkJsonArray_AddObjectAt $jsonFormData1 -1
set jsonObj_1 [CkJsonArray_ObjectAt $jsonFormData1 [expr [CkJsonArray_get_Size $jsonFormData1] - 1]]
CkJsonObject_UpdateString $jsonObj_1 "name" "anim labore esse sed"
CkJsonObject_UpdateString $jsonObj_1 "email" "U9c53zPvS@fuufIjVZIvZzDfDlCp.pac"
delete_CkJsonObject $jsonObj_1

CkHttpRequest_AddParam $req "panelists" [CkJsonArray_emit $jsonFormData1]

CkHttpRequest_AddHeader $req "Authorization" "Bearer <access_token>"

# resp is a CkHttpResponse
set resp [CkHttp_SynchronousRequest $http "api.zoom.us" 443 1 $req]
if {[CkHttp_get_LastMethodSuccess $http] == 0} then {
    puts [CkHttp_lastErrorText $http]
    delete_CkHttp $http
    delete_CkHttpRequest $req
    delete_CkJsonArray $jsonFormData1
    exit
}

puts [CkHttpResponse_get_StatusCode $resp]
puts [CkHttpResponse_bodyStr $resp]
delete_CkHttpResponse $resp


delete_CkHttp $http
delete_CkHttpRequest $req
delete_CkJsonArray $jsonFormData1

Curl Command

curl -X POST
	-H "Authorization: Bearer <access_token>"
	-H "Content-Type: multipart/form-data"
	--form 'panelists=[{"name":"incididunt","email":"1dvyCMDpuLjN5@IcXOmWxXXsharB.zm"},{"name":"anim labore esse sed","email":"U9c53zPvS@fuufIjVZIvZzDfDlCp.pac"}]'
https://api.zoom.us/v2/webinars/:webinarId/panelists

Postman Collection Item JSON

{
  "name": "Add panelists",
  "request": {
    "auth": {
      "type": "oauth2"
    },
    "method": "POST",
    "header": [
      {
        "key": "Content-Type",
        "value": "multipart/form-data"
      }
    ],
    "body": {
      "mode": "formdata",
      "formdata": [
        {
          "key": "panelists",
          "value": "[{\"name\":\"incididunt\",\"email\":\"1dvyCMDpuLjN5@IcXOmWxXXsharB.zm\"},{\"name\":\"anim labore esse sed\",\"email\":\"U9c53zPvS@fuufIjVZIvZzDfDlCp.pac\"}]",
          "description": "List of panelist objects.",
          "type": "text"
        }
      ]
    },
    "url": {
      "raw": "{{baseUrl}}/webinars/:webinarId/panelists",
      "host": [
        "{{baseUrl}}"
      ],
      "path": [
        "webinars",
        ":webinarId",
        "panelists"
      ],
      "variable": [
        {
          "key": "webinarId",
          "value": "68423085",
          "description": "(Required) The webinar's ID."
        }
      ]
    },
    "description": "Panelists in a Webinar can view and send video, screen share, annotate, etc and do much more compared to attendees in a webinar.<br>Use this API to [add panelists](https://support.zoom.us/hc/en-us/articles/115005657826-Inviting-Panelists-to-a-Webinar#h_7550d59e-23f5-4703-9e22-e76bded1ed70) to a scheduled webinar.<br><br>\n**Scopes:** `webinar:write:admin` `webinar:write`<br> \n **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Medium`<br>\n\n\n**Prerequisites:**\n* Pro or a higher plan with [Webinar Add-on](https://zoom.us/webinar).<br> "
  },
  "response": [
    {
      "name": "**HTTP Status Code:** `200`<br>\nWebinar plan subscription missing. Enable webinar for this user once the subscription is added.",
      "originalRequest": {
        "method": "POST",
        "header": [
          {
            "description": "Added as a part of security scheme: oauth2",
            "key": "Authorization",
            "value": "<token>"
          }
        ],
        "body": {
          "mode": "formdata",
          "formdata": [
            {
              "key": "panelists",
              "value": "[{\"name\":\"ipsum cupidatat\",\"email\":\"W5kjpUQ2@FOtQnikklONrqEhIlwreE.xo\"},{\"name\":\"exercitation dolor\",\"email\":\"gsA3G@HlvNUSLrqGWDbC.xq\"}]",
              "description": "List of panelist objects.",
              "type": "text"
            }
          ]
        },
        "url": {
          "raw": "{{baseUrl}}/webinars/:webinarId/panelists",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "webinars",
            ":webinarId",
            "panelists"
          ],
          "variable": [
            {
              "key": "webinarId",
              "value": "68423085",
              "description": "(Required) The webinar's ID."
            }
          ]
        }
      },
      "status": "OK",
      "code": 200,
      "_postman_previewlanguage": "text",
      "header": [
        {
          "key": "Content-Type",
          "value": "text/plain"
        }
      ],
      "cookie": [
      ],
      "body": ""
    },
    {
      "name": "**HTTP Status Code:** `201`<br>\nPanelist created.",
      "originalRequest": {
        "method": "POST",
        "header": [
          {
            "description": "Added as a part of security scheme: oauth2",
            "key": "Authorization",
            "value": "<token>"
          }
        ],
        "body": {
          "mode": "formdata",
          "formdata": [
            {
              "key": "panelists",
              "value": "[{\"name\":\"ipsum cupidatat\",\"email\":\"W5kjpUQ2@FOtQnikklONrqEhIlwreE.xo\"},{\"name\":\"exercitation dolor\",\"email\":\"gsA3G@HlvNUSLrqGWDbC.xq\"}]",
              "description": "List of panelist objects.",
              "type": "text"
            }
          ]
        },
        "url": {
          "raw": "{{baseUrl}}/webinars/:webinarId/panelists",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "webinars",
            ":webinarId",
            "panelists"
          ],
          "variable": [
            {
              "key": "webinarId",
              "value": "68423085",
              "description": "(Required) The webinar's ID."
            }
          ]
        }
      },
      "status": "Created",
      "code": 201,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "{\n \"id\": \"doetwerggrlor\",\n \"updated_at\": \"2019-01-25T10:04:27.051Z\"\n}"
    },
    {
      "name": "**HTTP Status Code:** `400`<br>\nBad request<br>\n**Error Code:** `1010`<br>\nUser does not belong to this account:{accountId}.<br>\n**Error Code:** `3000`<br>\nYou have reached the limit for the number of panelists you can add. Contact Zoom Support for more i",
      "originalRequest": {
        "method": "POST",
        "header": [
          {
            "description": "Added as a part of security scheme: oauth2",
            "key": "Authorization",
            "value": "<token>"
          }
        ],
        "body": {
          "mode": "formdata",
          "formdata": [
            {
              "key": "panelists",
              "value": "[{\"name\":\"ipsum cupidatat\",\"email\":\"W5kjpUQ2@FOtQnikklONrqEhIlwreE.xo\"},{\"name\":\"exercitation dolor\",\"email\":\"gsA3G@HlvNUSLrqGWDbC.xq\"}]",
              "description": "List of panelist objects.",
              "type": "text"
            }
          ]
        },
        "url": {
          "raw": "{{baseUrl}}/webinars/:webinarId/panelists",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "webinars",
            ":webinarId",
            "panelists"
          ],
          "variable": [
            {
              "key": "webinarId",
              "value": "68423085",
              "description": "(Required) The webinar's ID."
            }
          ]
        }
      },
      "status": "Bad Request",
      "code": 400,
      "_postman_previewlanguage": "text",
      "header": [
        {
          "key": "Content-Type",
          "value": "text/plain"
        }
      ],
      "cookie": [
      ],
      "body": ""
    },
    {
      "name": "**HTTP Status Code:** `404`<br>\nWebinar not found.<br>\n**Error Code:** `1001`<br>\nUser {userId} does not exist or does not belong to this account.<br>\n**Error Code:** `3001`<br>\nWebinar {webinarId} not found or has expired.<br>",
      "originalRequest": {
        "method": "POST",
        "header": [
          {
            "description": "Added as a part of security scheme: oauth2",
            "key": "Authorization",
            "value": "<token>"
          }
        ],
        "body": {
          "mode": "formdata",
          "formdata": [
            {
              "key": "panelists",
              "value": "[{\"name\":\"ipsum cupidatat\",\"email\":\"W5kjpUQ2@FOtQnikklONrqEhIlwreE.xo\"},{\"name\":\"exercitation dolor\",\"email\":\"gsA3G@HlvNUSLrqGWDbC.xq\"}]",
              "description": "List of panelist objects.",
              "type": "text"
            }
          ]
        },
        "url": {
          "raw": "{{baseUrl}}/webinars/:webinarId/panelists",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "webinars",
            ":webinarId",
            "panelists"
          ],
          "variable": [
            {
              "key": "webinarId",
              "value": "68423085",
              "description": "(Required) The webinar's ID."
            }
          ]
        }
      },
      "status": "Not Found",
      "code": 404,
      "_postman_previewlanguage": "text",
      "header": [
        {
          "key": "Content-Type",
          "value": "text/plain"
        }
      ],
      "cookie": [
      ],
      "body": ""
    },
    {
      "name": "**HTTP Status Code:** `429` <br> You have exceeded the daily rate limit of \"{0}\" for webinar **Add panelists** API requests for the panelist \"{1}\". You can resume these API requests at GMT 00:00:00.",
      "originalRequest": {
        "method": "POST",
        "header": [
          {
            "description": "Added as a part of security scheme: oauth2",
            "key": "Authorization",
            "value": "<token>"
          }
        ],
        "body": {
          "mode": "formdata",
          "formdata": [
            {
              "key": "panelists",
              "value": "[{\"name\":\"ipsum cupidatat\",\"email\":\"W5kjpUQ2@FOtQnikklONrqEhIlwreE.xo\"},{\"name\":\"exercitation dolor\",\"email\":\"gsA3G@HlvNUSLrqGWDbC.xq\"}]",
              "description": "List of panelist objects.",
              "type": "text"
            }
          ]
        },
        "url": {
          "raw": "{{baseUrl}}/webinars/:webinarId/panelists",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "webinars",
            ":webinarId",
            "panelists"
          ],
          "variable": [
            {
              "key": "webinarId",
              "value": "68423085",
              "description": "(Required) The webinar's ID."
            }
          ]
        }
      },
      "status": "Too Many Requests",
      "code": 429,
      "_postman_previewlanguage": "text",
      "header": [
        {
          "key": "Content-Type",
          "value": "text/plain"
        }
      ],
      "cookie": [
      ],
      "body": ""
    }
  ]
}