Chilkat Online Tools

DataFlex / Zoom API / Get webinar participants

Back to Collection Items

Use ChilkatAx-9.5.0-win32.pkg

Procedure Test
    Handle hoHttp
    Boolean iSuccess
    Variant vQueryParams
    Handle hoQueryParams
    Variant vResp
    Handle hoResp
    Variant vSbResponseBody
    Handle hoSbResponseBody
    Handle hoJResp
    Integer iRespStatusCode
    String sId
    String sUser_id
    String sUser_name
    String sDevice
    String sIp_address
    String sLocation
    String sNetwork_type
    String sMicrophone
    String sCamera
    String sSpeaker
    String sData_center
    String sFull_data_center
    String sConnection_type
    String sJoin_time
    String sLeave_time
    Boolean iShare_application
    Boolean iShare_desktop
    Boolean iShare_whiteboard
    Boolean iRecording
    String sStatus
    String sPc_name
    String sDomain
    String sMac_addr
    String sHarddisk_id
    String sVersion
    String sLeave_reason
    String sSip_uri
    String sFrom_sip_uri
    String sRole
    Integer iPage_count
    Integer iPage_size
    Integer iTotal_records
    String sNext_page_token
    Integer i
    Integer iCount_i
    String sTemp1
    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(cComChilkatJsonObject)) To hoQueryParams
    If (Not(IsComObjectCreated(hoQueryParams))) Begin
        Send CreateComObject of hoQueryParams
    End
    Get ComUpdateString Of hoQueryParams "type" "live" To iSuccess
    Get ComUpdateInt Of hoQueryParams "page_size" 30 To iSuccess
    Get ComUpdateString Of hoQueryParams "next_page_token" "quis officia in reprehenderit" To iSuccess
    Get ComUpdateString Of hoQueryParams "include_fields" "registrant_id" To iSuccess

    // Adds the "Authorization: Bearer <access_token>" header.
    Set ComAuthToken Of hoHttp To "<access_token>"

    Get pvComObject of hoQueryParams to vQueryParams
    Get ComQuickRequestParams Of hoHttp "GET" "https://api.zoom.us/v2/metrics/webinars/:webinarId/participants" vQueryParams 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 Create (RefClass(cComChilkatStringBuilder)) To hoSbResponseBody
    If (Not(IsComObjectCreated(hoSbResponseBody))) Begin
        Send CreateComObject of hoSbResponseBody
    End
    Get pvComObject of hoSbResponseBody to vSbResponseBody
    Get ComGetBodySb Of hoResp vSbResponseBody To iSuccess

    Get Create (RefClass(cComChilkatJsonObject)) To hoJResp
    If (Not(IsComObjectCreated(hoJResp))) Begin
        Send CreateComObject of hoJResp
    End
    Get pvComObject of hoSbResponseBody to vSbResponseBody
    Get ComLoadSb Of hoJResp vSbResponseBody To iSuccess
    Set ComEmitCompact Of hoJResp To False

    Showln "Response Body:"
    Get ComEmit Of hoJResp To sTemp1
    Showln sTemp1

    Get ComStatusCode Of hoResp To iRespStatusCode
    Showln "Response Status Code = " iRespStatusCode
    If (iRespStatusCode >= 400) Begin
        Showln "Response Header:"
        Get ComHeader Of hoResp To sTemp1
        Showln sTemp1
        Showln "Failed."
        Send Destroy of hoResp
        Procedure_Return
    End

    Send Destroy of hoResp

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

    // {
    //   "page_count": 1,
    //   "page_size": 30,
    //   "total_records": 1,
    //   "next_page_token": "",
    //   "participants": [
    //     {
    //       "id": "d52f19c548b88490b5d16fcbd38",
    //       "user_id": "32dsfsd4g5gd",
    //       "user_name": "dojo",
    //       "device": "WIN",
    //       "ip_address": "127.0.0.1",
    //       "location": "New York",
    //       "network_type": "Wired",
    //       "microphone": "Plantronics BT600",
    //       "camera": "FaceTime HD Camera",
    //       "speaker": "Plantronics BT600",
    //       "data_center": "SC",
    //       "full_data_center": "United States;United States (US03_SC CRC)",
    //       "connection_type": "P2P",
    //       "join_time": "2019-09-07T13:15:02.837Z",
    //       "leave_time": "2019-09-07T13:15:09.837Z",
    //       "share_application": false,
    //       "share_desktop": true,
    //       "share_whiteboard": true,
    //       "recording": false,
    //       "status": "in_waiting_room",
    //       "pc_name": "dojo's pc",
    //       "domain": "Dojo-workspace",
    //       "mac_addr": " 00:0a:95:9d:68:16",
    //       "harddisk_id": "sed proident in",
    //       "version": "4.4.55383.0716",
    //       "leave_reason": "Dojo left the meeting.<br>Reason: Host ended the meeting.",
    //       "sip_uri": "sip:sipp@10.100.112.140:11029",
    //       "from_sip_uri": "sip:sipp@10.100.112.140:11029",
    //       "role": "panelist"
    //     }
    //   ]
    // }

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

    Get ComIntOf Of hoJResp "page_count" To iPage_count
    Get ComIntOf Of hoJResp "page_size" To iPage_size
    Get ComIntOf Of hoJResp "total_records" To iTotal_records
    Get ComStringOf Of hoJResp "next_page_token" To sNext_page_token
    Move 0 To i
    Get ComSizeOfArray Of hoJResp "participants" To iCount_i
    While (i < iCount_i)
        Set ComI Of hoJResp To i
        Get ComStringOf Of hoJResp "participants[i].id" To sId
        Get ComStringOf Of hoJResp "participants[i].user_id" To sUser_id
        Get ComStringOf Of hoJResp "participants[i].user_name" To sUser_name
        Get ComStringOf Of hoJResp "participants[i].device" To sDevice
        Get ComStringOf Of hoJResp "participants[i].ip_address" To sIp_address
        Get ComStringOf Of hoJResp "participants[i].location" To sLocation
        Get ComStringOf Of hoJResp "participants[i].network_type" To sNetwork_type
        Get ComStringOf Of hoJResp "participants[i].microphone" To sMicrophone
        Get ComStringOf Of hoJResp "participants[i].camera" To sCamera
        Get ComStringOf Of hoJResp "participants[i].speaker" To sSpeaker
        Get ComStringOf Of hoJResp "participants[i].data_center" To sData_center
        Get ComStringOf Of hoJResp "participants[i].full_data_center" To sFull_data_center
        Get ComStringOf Of hoJResp "participants[i].connection_type" To sConnection_type
        Get ComStringOf Of hoJResp "participants[i].join_time" To sJoin_time
        Get ComStringOf Of hoJResp "participants[i].leave_time" To sLeave_time
        Get ComBoolOf Of hoJResp "participants[i].share_application" To iShare_application
        Get ComBoolOf Of hoJResp "participants[i].share_desktop" To iShare_desktop
        Get ComBoolOf Of hoJResp "participants[i].share_whiteboard" To iShare_whiteboard
        Get ComBoolOf Of hoJResp "participants[i].recording" To iRecording
        Get ComStringOf Of hoJResp "participants[i].status" To sStatus
        Get ComStringOf Of hoJResp "participants[i].pc_name" To sPc_name
        Get ComStringOf Of hoJResp "participants[i].domain" To sDomain
        Get ComStringOf Of hoJResp "participants[i].mac_addr" To sMac_addr
        Get ComStringOf Of hoJResp "participants[i].harddisk_id" To sHarddisk_id
        Get ComStringOf Of hoJResp "participants[i].version" To sVersion
        Get ComStringOf Of hoJResp "participants[i].leave_reason" To sLeave_reason
        Get ComStringOf Of hoJResp "participants[i].sip_uri" To sSip_uri
        Get ComStringOf Of hoJResp "participants[i].from_sip_uri" To sFrom_sip_uri
        Get ComStringOf Of hoJResp "participants[i].role" To sRole
        Move (i + 1) To i
    Loop



End_Procedure

Curl Command

curl -G -d "type=live"
	-d "page_size=30"
	-d "next_page_token=quis%20officia%20in%20reprehenderit"
	-d "include_fields=registrant_id"
	-H "Authorization: Bearer <access_token>"
https://api.zoom.us/v2/metrics/webinars/:webinarId/participants

Postman Collection Item JSON

{
  "name": "Get webinar participants",
  "request": {
    "auth": {
      "type": "oauth2"
    },
    "method": "GET",
    "header": [
    ],
    "url": {
      "raw": "{{baseUrl}}/metrics/webinars/:webinarId/participants?type=live&page_size=30&next_page_token=quis officia in reprehenderit&include_fields=registrant_id",
      "host": [
        "{{baseUrl}}"
      ],
      "path": [
        "metrics",
        "webinars",
        ":webinarId",
        "participants"
      ],
      "query": [
        {
          "key": "type",
          "value": "live",
          "description": "The type of webinar to query: \n* `past` — All past webinars. \n* `live` - All live webinars. \n\nThis value defaults to `live`."
        },
        {
          "key": "page_size",
          "value": "30",
          "description": "The number of records returned within a single API call."
        },
        {
          "key": "next_page_token",
          "value": "quis officia in reprehenderit",
          "description": "The next page token is used to paginate through large result sets. A next page token will be returned whenever the set of available results exceeds the current page size. The expiration period for this token is 15 minutes."
        },
        {
          "key": "include_fields",
          "value": "registrant_id",
          "description": "Additional fields to include in the query: \n* `registrant_id` — Include the webinar registrant's ID. The registrant ID is the [webinar registrant's unique ID](https://marketplace.zoom.us/docs/api-reference/zoom-api/webinars/webinarregistrants)."
        }
      ],
      "variable": [
        {
          "key": "webinarId",
          "value": "quis officia in reprehenderit",
          "description": "(Required) The webinar's ID or universally unique ID (UUID). \n* If you provide a webinar ID, the API will return a response for the latest webinar instance. \n* If you provide a webinar UUID that begins with a `/` character or contains the `//` characters, you **must** double-encode the webinar UUID before making an API request."
        }
      ]
    },
    "description": "Use this API to return information about participants from live or past webinars. \n\n**Note:** \n\nThis API may return empty values for participants' `user_name`, `ip_address`, `location`, and `email` responses when the account calling this API: \n* Does **not** have a signed HIPAA business associate agreement (BAA). \n* Is a [**legacy** HIPAA BAA account](https://marketplace.zoom.us/docs/api-reference/other-references/legacy-business-associate-agreements). \n\n**Scopes:** `dashboard_webinars:read:admin` <br> **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Heavy` \n\n**Prerequisites:** \n* A Business, Education, or API Plan with Webinar add-on."
  },
  "response": [
    {
      "name": "**HTTP Status Code:** `200`<br>\nWebinar participants returned.",
      "originalRequest": {
        "method": "GET",
        "header": [
          {
            "description": "Added as a part of security scheme: oauth2",
            "key": "Authorization",
            "value": "<token>"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/metrics/webinars/:webinarId/participants?type=live&page_size=30&next_page_token=quis officia in reprehenderit&include_fields=registrant_id",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "metrics",
            "webinars",
            ":webinarId",
            "participants"
          ],
          "query": [
            {
              "key": "type",
              "value": "live"
            },
            {
              "key": "page_size",
              "value": "30"
            },
            {
              "key": "next_page_token",
              "value": "quis officia in reprehenderit"
            },
            {
              "key": "include_fields",
              "value": "registrant_id"
            }
          ],
          "variable": [
            {
              "key": "webinarId",
              "value": "quis officia in reprehenderit",
              "description": "(Required) The webinar's ID or universally unique ID (UUID). \n* If you provide a webinar ID, the API will return a response for the latest webinar instance. \n* If you provide a webinar UUID that begins with a `/` character or contains the `//` characters, you **must** double-encode the webinar UUID before making an API request."
            }
          ]
        }
      },
      "status": "OK",
      "code": 200,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "{\n \"page_count\": 1,\n \"page_size\": 30,\n \"total_records\": 1,\n \"next_page_token\": \"\",\n \"participants\": [\n  {\n   \"id\": \"d52f19c548b88490b5d16fcbd38\",\n   \"user_id\": \"32dsfsd4g5gd\",\n   \"user_name\": \"dojo\",\n   \"device\": \"WIN\",\n   \"ip_address\": \"127.0.0.1\",\n   \"location\": \"New York\",\n   \"network_type\": \"Wired\",\n   \"microphone\": \"Plantronics BT600\",\n   \"camera\": \"FaceTime HD Camera\",\n   \"speaker\": \"Plantronics BT600\",\n   \"data_center\": \"SC\",\n   \"full_data_center\": \"United States;United States (US03_SC CRC)\",\n   \"connection_type\": \"P2P\",\n   \"join_time\": \"2019-09-07T13:15:02.837Z\",\n   \"leave_time\": \"2019-09-07T13:15:09.837Z\",\n   \"share_application\": false,\n   \"share_desktop\": true,\n   \"share_whiteboard\": true,\n   \"recording\": false,\n   \"status\": \"in_waiting_room\",\n   \"pc_name\": \"dojo's pc\",\n   \"domain\": \"Dojo-workspace\",\n   \"mac_addr\": \" 00:0a:95:9d:68:16\",\n   \"harddisk_id\": \"sed proident in\",\n   \"version\": \"4.4.55383.0716\",\n   \"leave_reason\": \"Dojo left the meeting.<br>Reason: Host ended the meeting.\",\n   \"sip_uri\": \"sip:sipp@10.100.112.140:11029\",\n   \"from_sip_uri\": \"sip:sipp@10.100.112.140:11029\",\n   \"role\": \"panelist\"\n  }\n ]\n}"
    },
    {
      "name": "**Error Code:** `300`<br>\nCan not access webinar info, {webinarId}.",
      "originalRequest": {
        "method": "GET",
        "header": [
          {
            "description": "Added as a part of security scheme: oauth2",
            "key": "Authorization",
            "value": "<token>"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/metrics/webinars/:webinarId/participants?type=live&page_size=30&next_page_token=quis officia in reprehenderit&include_fields=registrant_id",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "metrics",
            "webinars",
            ":webinarId",
            "participants"
          ],
          "query": [
            {
              "key": "type",
              "value": "live"
            },
            {
              "key": "page_size",
              "value": "30"
            },
            {
              "key": "next_page_token",
              "value": "quis officia in reprehenderit"
            },
            {
              "key": "include_fields",
              "value": "registrant_id"
            }
          ],
          "variable": [
            {
              "key": "webinarId",
              "value": "quis officia in reprehenderit",
              "description": "(Required) The webinar's ID or universally unique ID (UUID). \n* If you provide a webinar ID, the API will return a response for the latest webinar instance. \n* If you provide a webinar UUID that begins with a `/` character or contains the `//` characters, you **must** double-encode the webinar UUID before making an API request."
            }
          ]
        }
      },
      "status": "Multiple Choices",
      "code": 300,
      "_postman_previewlanguage": "text",
      "header": [
        {
          "key": "Content-Type",
          "value": "text/plain"
        }
      ],
      "cookie": [
      ],
      "body": ""
    },
    {
      "name": "**HTTP Status Code:** `404`<br>\n**Error Code:** `3001`<br>\nThis webinar's detail info is not available or ID is not valid.",
      "originalRequest": {
        "method": "GET",
        "header": [
          {
            "description": "Added as a part of security scheme: oauth2",
            "key": "Authorization",
            "value": "<token>"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/metrics/webinars/:webinarId/participants?type=live&page_size=30&next_page_token=quis officia in reprehenderit&include_fields=registrant_id",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "metrics",
            "webinars",
            ":webinarId",
            "participants"
          ],
          "query": [
            {
              "key": "type",
              "value": "live"
            },
            {
              "key": "page_size",
              "value": "30"
            },
            {
              "key": "next_page_token",
              "value": "quis officia in reprehenderit"
            },
            {
              "key": "include_fields",
              "value": "registrant_id"
            }
          ],
          "variable": [
            {
              "key": "webinarId",
              "value": "quis officia in reprehenderit",
              "description": "(Required) The webinar's ID or universally unique ID (UUID). \n* If you provide a webinar ID, the API will return a response for the latest webinar instance. \n* If you provide a webinar UUID that begins with a `/` character or contains the `//` characters, you **must** double-encode the webinar UUID before making an API request."
            }
          ]
        }
      },
      "status": "Not Found",
      "code": 404,
      "_postman_previewlanguage": "text",
      "header": [
        {
          "key": "Content-Type",
          "value": "text/plain"
        }
      ],
      "cookie": [
      ],
      "body": ""
    }
  ]
}