Chilkat Online Tools

DataFlex / Zoom API / Add panelists

Back to Collection Items

Use ChilkatAx-9.5.0-win32.pkg

Procedure Test
    Handle hoHttp
    Boolean iSuccess
    Variant vReq
    Handle hoReq
    Handle hoJsonFormData1
    Variant vJsonObj_1
    Handle hoJsonObj_1
    Variant vResp
    Handle hoResp
    String sTemp1
    Integer iTemp1
    Boolean bTemp1

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

    Get Create (RefClass(cComChilkatHttp)) To hoHttp
    If (Not(IsComObjectCreated(hoHttp))) Begin
        Send CreateComObject of hoHttp
    End

    Get Create (RefClass(cComChilkatHttpRequest)) To hoReq
    If (Not(IsComObjectCreated(hoReq))) Begin
        Send CreateComObject of hoReq
    End
    Set ComHttpVerb Of hoReq To "POST"
    Set ComPath Of hoReq To "/v2/webinars/:webinarId/panelists"
    Set ComContentType Of hoReq To "multipart/form-data"

    Get Create (RefClass(cComChilkatJsonArray)) To hoJsonFormData1
    If (Not(IsComObjectCreated(hoJsonFormData1))) Begin
        Send CreateComObject of hoJsonFormData1
    End

    Get ComAddObjectAt Of hoJsonFormData1 -1 To iSuccess
    Get ComSize Of hoJsonFormData1 To iTemp1
    Get ComObjectAt Of hoJsonFormData1 (iTemp1 - 1) To vJsonObj_1
    If (IsComObject(vJsonObj_1)) Begin
        Get Create (RefClass(cComChilkatJsonObject)) To hoJsonObj_1
        Set pvComObject Of hoJsonObj_1 To vJsonObj_1
    End
    Get ComUpdateString Of hoJsonObj_1 "name" "incididunt" To iSuccess
    Get ComUpdateString Of hoJsonObj_1 "email" "1dvyCMDpuLjN5@IcXOmWxXXsharB.zm" To iSuccess
    Send Destroy of hoJsonObj_1

    Get ComAddObjectAt Of hoJsonFormData1 -1 To iSuccess
    Get ComSize Of hoJsonFormData1 To iTemp1
    Get ComObjectAt Of hoJsonFormData1 (iTemp1 - 1) To vJsonObj_1
    If (IsComObject(vJsonObj_1)) Begin
        Get Create (RefClass(cComChilkatJsonObject)) To hoJsonObj_1
        Set pvComObject Of hoJsonObj_1 To vJsonObj_1
    End
    Get ComUpdateString Of hoJsonObj_1 "name" "anim labore esse sed" To iSuccess
    Get ComUpdateString Of hoJsonObj_1 "email" "U9c53zPvS@fuufIjVZIvZzDfDlCp.pac" To iSuccess
    Send Destroy of hoJsonObj_1

    Get ComEmit Of hoJsonFormData1 To sTemp1
    Send ComAddParam To hoReq "panelists" sTemp1

    Send ComAddHeader To hoReq "Authorization" "Bearer <access_token>"

    Get pvComObject of hoReq to vReq
    Get ComSynchronousRequest Of hoHttp "api.zoom.us" 443 True vReq To vResp
    If (IsComObject(vResp)) Begin
        Get Create (RefClass(cComChilkatHttpResponse)) To hoResp
        Set pvComObject Of hoResp To vResp
    End
    Get ComLastMethodSuccess Of hoHttp To bTemp1
    If (bTemp1 = False) Begin
        Get ComLastErrorText Of hoHttp To sTemp1
        Showln sTemp1
        Procedure_Return
    End

    Get ComStatusCode Of hoResp To iTemp1
    Showln iTemp1
    Get ComBodyStr Of hoResp To sTemp1
    Showln sTemp1
    Send Destroy of hoResp


End_Procedure

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