Chilkat Online Tools

delphiDll / Zoom API / Get meeting participant reports

Back to Collection Items

var
http: HCkHttp;
success: Boolean;
queryParams: HCkJsonObject;
resp: HCkHttpResponse;
sbResponseBody: HCkStringBuilder;
jResp: HCkJsonObject;
respStatusCode: Integer;
id: PWideChar;
user_id: PWideChar;
name: PWideChar;
user_email: PWideChar;
join_time: PWideChar;
leave_time: PWideChar;
duration: PWideChar;
page_count: PWideChar;
page_size: PWideChar;
total_records: PWideChar;
next_page_token: PWideChar;
i: Integer;
count_i: Integer;

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

http := CkHttp_Create();

queryParams := CkJsonObject_Create();
CkJsonObject_UpdateInt(queryParams,'page_size',30);
CkJsonObject_UpdateString(queryParams,'next_page_token','quis officia in reprehenderit');
CkJsonObject_UpdateString(queryParams,'include_fields','registrant_id');

// Adds the "Authorization: Bearer <access_token>" header.
CkHttp_putAuthToken(http,'<access_token>');

resp := CkHttp_QuickRequestParams(http,'GET','https://api.zoom.us/v2/report/meetings/:meetingId/participants',queryParams);
if (CkHttp_getLastMethodSuccess(http) = False) then
  begin
    Memo1.Lines.Add(CkHttp__lastErrorText(http));
    Exit;
  end;

sbResponseBody := CkStringBuilder_Create();
CkHttpResponse_GetBodySb(resp,sbResponseBody);

jResp := CkJsonObject_Create();
CkJsonObject_LoadSb(jResp,sbResponseBody);
CkJsonObject_putEmitCompact(jResp,False);

Memo1.Lines.Add('Response Body:');
Memo1.Lines.Add(CkJsonObject__emit(jResp));

respStatusCode := CkHttpResponse_getStatusCode(resp);
Memo1.Lines.Add('Response Status Code = ' + IntToStr(respStatusCode));
if (respStatusCode >= 400) then
  begin
    Memo1.Lines.Add('Response Header:');
    Memo1.Lines.Add(CkHttpResponse__header(resp));
    Memo1.Lines.Add('Failed.');
    CkHttpResponse_Dispose(resp);
    Exit;
  end;
CkHttpResponse_Dispose(resp);

// 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": "dskfjladjskfl",
//       "user_id": "sdfjkldsfdfgdfg",
//       "name": "Riya",
//       "user_email": "example@example.com",
//       "join_time": "2019-02-01T12:34:12.660Z",
//       "leave_time": "2019-03-01T12:34:12.660Z",
//       "duration": "20:00"
//     }
//   ]
// }

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

page_count := CkJsonObject__stringOf(jResp,'page_count');
page_size := CkJsonObject__stringOf(jResp,'page_size');
total_records := CkJsonObject__stringOf(jResp,'total_records');
next_page_token := CkJsonObject__stringOf(jResp,'next_page_token');
i := 0;
count_i := CkJsonObject_SizeOfArray(jResp,'participants');
while i < count_i do
  begin
    CkJsonObject_putI(jResp,i);
    id := CkJsonObject__stringOf(jResp,'participants[i].id');
    user_id := CkJsonObject__stringOf(jResp,'participants[i].user_id');
    name := CkJsonObject__stringOf(jResp,'participants[i].name');
    user_email := CkJsonObject__stringOf(jResp,'participants[i].user_email');
    join_time := CkJsonObject__stringOf(jResp,'participants[i].join_time');
    leave_time := CkJsonObject__stringOf(jResp,'participants[i].leave_time');
    duration := CkJsonObject__stringOf(jResp,'participants[i].duration');
    i := i + 1;
  end;

CkHttp_Dispose(http);
CkJsonObject_Dispose(queryParams);
CkStringBuilder_Dispose(sbResponseBody);
CkJsonObject_Dispose(jResp);

Curl Command

curl -G -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/report/meetings/:meetingId/participants

Postman Collection Item JSON

{
  "name": "Get meeting participant reports",
  "request": {
    "auth": {
      "type": "oauth2"
    },
    "method": "GET",
    "header": [
    ],
    "url": {
      "raw": "{{baseUrl}}/report/meetings/:meetingId/participants?page_size=30&next_page_token=quis officia in reprehenderit&include_fields=registrant_id",
      "host": [
        "{{baseUrl}}"
      ],
      "path": [
        "report",
        "meetings",
        ":meetingId",
        "participants"
      ],
      "query": [
        {
          "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": "Provide `registrant_id` as the value for this field if you would like to see the registrant ID attribute in the response of this API call. A registrant ID is a unique identifier of a [meeting registrant](https://marketplace.zoom.us/docs/api-reference/zoom-api/meetings/meetingregistrants).<br>\n\n"
        }
      ],
      "variable": [
        {
          "key": "meetingId",
          "value": "quis officia in reprehenderit",
          "description": "(Required) The meeting's ID or universally unique ID (UUID). \n* If you provide a meeting ID, the API will return a response for the latest meeting instance. \n* If you provide a meeting UUID that begins with a `/` character or contains the `//` characters, you **must** double-encode the meeting UUID before making an API request."
        }
      ]
    },
    "description": "Use this API to return a report of a past meeting with two or more participants, including the host. To return a report for past meeting with only **one** participant, use the [**List meeting participants**](https://marketplace.zoom.us/docs/api-reference/zoom-api/dashboards/dashboardmeetingparticipants) API. \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:** `report:read:admin` <br> **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Heavy` \n\n**Prerequisites:** \n* A Pro or a higher plan."
  },
  "response": [
    {
      "name": "**HTTP Status Code:** `200`<br>\nMeeting participants report returned.<br>\nThis is only available for paid account.",
      "originalRequest": {
        "method": "GET",
        "header": [
          {
            "description": "Added as a part of security scheme: oauth2",
            "key": "Authorization",
            "value": "<token>"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/report/meetings/:meetingId/participants?page_size=30&next_page_token=quis officia in reprehenderit&include_fields=registrant_id",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "report",
            "meetings",
            ":meetingId",
            "participants"
          ],
          "query": [
            {
              "key": "page_size",
              "value": "30"
            },
            {
              "key": "next_page_token",
              "value": "quis officia in reprehenderit"
            },
            {
              "key": "include_fields",
              "value": "registrant_id"
            }
          ],
          "variable": [
            {
              "key": "meetingId",
              "value": "quis officia in reprehenderit",
              "description": "(Required) The meeting's ID or universally unique ID (UUID). \n* If you provide a meeting ID, the API will return a response for the latest meeting instance. \n* If you provide a meeting UUID that begins with a `/` character or contains the `//` characters, you **must** double-encode the meeting 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\": \"dskfjladjskfl\",\n   \"user_id\": \"sdfjkldsfdfgdfg\",\n   \"name\": \"Riya\",\n   \"user_email\": \"example@example.com\",\n   \"join_time\": \"2019-02-01T12:34:12.660Z\",\n   \"leave_time\": \"2019-03-01T12:34:12.660Z\",\n   \"duration\": \"20:00\"\n  }\n ]\n}"
    },
    {
      "name": "**HTTP Status Code:** `300`<br>Cannot access meeting information:{meetingId}.<br>\nThe next page token is either invalid or has expired.",
      "originalRequest": {
        "method": "GET",
        "header": [
          {
            "description": "Added as a part of security scheme: oauth2",
            "key": "Authorization",
            "value": "<token>"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/report/meetings/:meetingId/participants?page_size=30&next_page_token=quis officia in reprehenderit&include_fields=registrant_id",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "report",
            "meetings",
            ":meetingId",
            "participants"
          ],
          "query": [
            {
              "key": "page_size",
              "value": "30"
            },
            {
              "key": "next_page_token",
              "value": "quis officia in reprehenderit"
            },
            {
              "key": "include_fields",
              "value": "registrant_id"
            }
          ],
          "variable": [
            {
              "key": "meetingId",
              "value": "quis officia in reprehenderit",
              "description": "(Required) The meeting's ID or universally unique ID (UUID). \n* If you provide a meeting ID, the API will return a response for the latest meeting instance. \n* If you provide a meeting UUID that begins with a `/` character or contains the `//` characters, you **must** double-encode the meeting 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:** `400`<br>\nBad request<br>\n**Error Code:** `1010`<br>\nUser does not belong to this account:{accountId}.<br>",
      "originalRequest": {
        "method": "GET",
        "header": [
          {
            "description": "Added as a part of security scheme: oauth2",
            "key": "Authorization",
            "value": "<token>"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/report/meetings/:meetingId/participants?page_size=30&next_page_token=quis officia in reprehenderit&include_fields=registrant_id",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "report",
            "meetings",
            ":meetingId",
            "participants"
          ],
          "query": [
            {
              "key": "page_size",
              "value": "30"
            },
            {
              "key": "next_page_token",
              "value": "quis officia in reprehenderit"
            },
            {
              "key": "include_fields",
              "value": "registrant_id"
            }
          ],
          "variable": [
            {
              "key": "meetingId",
              "value": "quis officia in reprehenderit",
              "description": "(Required) The meeting's ID or universally unique ID (UUID). \n* If you provide a meeting ID, the API will return a response for the latest meeting instance. \n* If you provide a meeting UUID that begins with a `/` character or contains the `//` characters, you **must** double-encode the meeting UUID before making an API request."
            }
          ]
        }
      },
      "status": "Bad Request",
      "code": 400,
      "_postman_previewlanguage": "text",
      "header": [
        {
          "key": "Content-Type",
          "value": "text/plain"
        }
      ],
      "cookie": [
      ],
      "body": ""
    },
    {
      "name": "**HTTP Status Code:** `404`<br>\nMeeting ID not found.<br>\n**Error Code:** `3001`<br>\nMeeting  {MeetingId} not found or has expired.<br>",
      "originalRequest": {
        "method": "GET",
        "header": [
          {
            "description": "Added as a part of security scheme: oauth2",
            "key": "Authorization",
            "value": "<token>"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/report/meetings/:meetingId/participants?page_size=30&next_page_token=quis officia in reprehenderit&include_fields=registrant_id",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "report",
            "meetings",
            ":meetingId",
            "participants"
          ],
          "query": [
            {
              "key": "page_size",
              "value": "30"
            },
            {
              "key": "next_page_token",
              "value": "quis officia in reprehenderit"
            },
            {
              "key": "include_fields",
              "value": "registrant_id"
            }
          ],
          "variable": [
            {
              "key": "meetingId",
              "value": "quis officia in reprehenderit",
              "description": "(Required) The meeting's ID or universally unique ID (UUID). \n* If you provide a meeting ID, the API will return a response for the latest meeting instance. \n* If you provide a meeting UUID that begins with a `/` character or contains the `//` characters, you **must** double-encode the meeting UUID before making an API request."
            }
          ]
        }
      },
      "status": "Not Found",
      "code": 404,
      "_postman_previewlanguage": "text",
      "header": [
        {
          "key": "Content-Type",
          "value": "text/plain"
        }
      ],
      "cookie": [
      ],
      "body": ""
    }
  ]
}