Chilkat Online Tools

Foxpro / Zoom API / Add panelists

Back to Collection Items

LOCAL loHttp
LOCAL lnSuccess
LOCAL loReq
LOCAL loJsonFormData1
LOCAL loJsonObj_1
LOCAL loResp

* 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')

* For versions of Chilkat < 10.0.0, use CreateObject('Chilkat_9_5_0.HttpRequest')
loReq = CreateObject('Chilkat.HttpRequest')
loReq.HttpVerb = "POST"
loReq.Path = "/v2/webinars/:webinarId/panelists"
loReq.ContentType = "multipart/form-data"

* For versions of Chilkat < 10.0.0, use CreateObject('Chilkat_9_5_0.JsonArray')
loJsonFormData1 = CreateObject('Chilkat.JsonArray')

loJsonFormData1.AddObjectAt(-1)
loJsonObj_1 = loJsonFormData1.ObjectAt(loJsonFormData1.Size - 1)
loJsonObj_1.UpdateString("name","incididunt")
loJsonObj_1.UpdateString("email","1dvyCMDpuLjN5@IcXOmWxXXsharB.zm")
RELEASE loJsonObj_1

loJsonFormData1.AddObjectAt(-1)
loJsonObj_1 = loJsonFormData1.ObjectAt(loJsonFormData1.Size - 1)
loJsonObj_1.UpdateString("name","anim labore esse sed")
loJsonObj_1.UpdateString("email","U9c53zPvS@fuufIjVZIvZzDfDlCp.pac")
RELEASE loJsonObj_1

loReq.AddStringForUpload2("panelists","",loJsonFormData1,"utf-8","application/json")

loReq.AddHeader("Authorization","Bearer <access_token>")

loResp = loHttp.SynchronousRequest("api.zoom.us",443,1,loReq)
IF (loHttp.LastMethodSuccess = 0) THEN
    ? loHttp.LastErrorText
    RELEASE loHttp
    RELEASE loReq
    RELEASE loJsonFormData1
    CANCEL
ENDIF

? STR(loResp.StatusCode)
? loResp.BodyStr
RELEASE loResp

RELEASE loHttp
RELEASE loReq
RELEASE loJsonFormData1

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": ""
    }
  ]
}