Swift3 / Zoom API / Add panelists
Back to Collection Items
func chilkatTest() {
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
let http = CkoHttp()!
var success: Bool
let req = CkoHttpRequest()!
req.httpVerb = "POST"
req.path = "/v2/webinars/:webinarId/panelists"
req.contentType = "multipart/form-data"
let jsonFormData1 = CkoJsonArray()!
jsonFormData1.addObject(at: -1)
var jsonObj_1: CkoJsonObject? = jsonFormData1.object(at: jsonFormData1.size.intValue - 1)
jsonObj_1!.update("name", value: "incididunt")
jsonObj_1!.update("email", value: "1dvyCMDpuLjN5@IcXOmWxXXsharB.zm")
jsonObj_1 = nil
jsonFormData1.addObject(at: -1)
jsonObj_1 = jsonFormData1.object(at: jsonFormData1.size.intValue - 1)
jsonObj_1!.update("name", value: "anim labore esse sed")
jsonObj_1!.update("email", value: "U9c53zPvS@fuufIjVZIvZzDfDlCp.pac")
jsonObj_1 = nil
req.addString(forUpload2: "panelists", filename: "", strData: jsonFormData1, charset: "utf-8", contentType: "application/json")
req.addHeader("Authorization", value: "Bearer <access_token>")
var resp: CkoHttpResponse? = http.synchronousRequest("api.zoom.us", port: 443, ssl: true, req: req)
if http.lastMethodSuccess == false {
print("\(http.lastErrorText!)")
return
}
print("\(resp!.statusCode.intValue)")
print("\(resp!.bodyStr!)")
resp = nil
}
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": ""
}
]
}