Chilkat Online Tools

C / Zoom API / Get meeting reports

Back to Collection Items

#include <C_CkHttp.h>
#include <C_CkJsonObject.h>
#include <C_CkHttpResponse.h>
#include <C_CkStringBuilder.h>

void ChilkatSample(void)
    {
    HCkHttp http;
    BOOL success;
    HCkJsonObject queryParams;
    HCkHttpResponse resp;
    HCkStringBuilder sbResponseBody;
    HCkJsonObject jResp;
    int respStatusCode;

    // 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_UpdateString(queryParams,"from","1989-05-07");
    CkJsonObject_UpdateString(queryParams,"to","1989-05-07");
    CkJsonObject_UpdateInt(queryParams,"page_size",30);
    CkJsonObject_UpdateString(queryParams,"next_page_token","quis officia in reprehenderit");
    CkJsonObject_UpdateString(queryParams,"type","past");

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

    resp = CkHttp_QuickRequestParams(http,"GET","https://api.zoom.us/v2/report/users/:userId/meetings",queryParams);
    if (CkHttp_getLastMethodSuccess(http) == FALSE) {
        printf("%s\n",CkHttp_lastErrorText(http));
        CkHttp_Dispose(http);
        CkJsonObject_Dispose(queryParams);
        return;
    }

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

    jResp = CkJsonObject_Create();
    CkJsonObject_LoadSb(jResp,sbResponseBody);
    CkJsonObject_putEmitCompact(jResp,FALSE);

    printf("Response Body:\n");
    printf("%s\n",CkJsonObject_emit(jResp));

    respStatusCode = CkHttpResponse_getStatusCode(resp);
    printf("Response Status Code = %d\n",respStatusCode);
    if (respStatusCode >= 400) {
        printf("Response Header:\n");
        printf("%s\n",CkHttpResponse_header(resp));
        printf("Failed.\n");
        CkHttpResponse_Dispose(resp);
        CkHttp_Dispose(http);
        CkJsonObject_Dispose(queryParams);
        CkStringBuilder_Dispose(sbResponseBody);
        CkJsonObject_Dispose(jResp);
        return;
    }

    CkHttpResponse_Dispose(resp);


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

    }

Curl Command

curl -G -d "from=1989-05-07"
	-d "to=1989-05-07"
	-d "page_size=30"
	-d "next_page_token=quis%20officia%20in%20reprehenderit"
	-d "type=past"
	-H "Authorization: Bearer <access_token>"
https://api.zoom.us/v2/report/users/:userId/meetings

Postman Collection Item JSON

{
  "name": "Get meeting reports",
  "request": {
    "method": "GET",
    "header": [
    ],
    "url": {
      "raw": "{{baseUrl}}/report/users/:userId/meetings?from=1989-05-07&to=1989-05-07&page_size=30&next_page_token=quis officia in reprehenderit&type=past",
      "host": [
        "{{baseUrl}}"
      ],
      "path": [
        "report",
        "users",
        ":userId",
        "meetings"
      ],
      "query": [
        {
          "key": "from",
          "value": "1989-05-07",
          "description": "(Required) Start date in 'yyyy-mm-dd' format. The date range defined by the \"from\" and \"to\" parameters should only be one month as the report includes only one month worth of data at once."
        },
        {
          "key": "to",
          "value": "1989-05-07",
          "description": "(Required) End date."
        },
        {
          "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": "type",
          "value": "past",
          "description": "The meeting types: <br>`past` - Past meetings.<br>`pastOne` - Past one user meetings. "
        }
      ],
      "variable": [
        {
          "key": "userId",
          "value": "quis officia in reprehenderit",
          "description": "(Required) The user ID or email address of the user. For user-level apps, pass the `me` value for this parameter."
        }
      ]
    },
    "description": "Retrieve [report](https://support.zoom.us/hc/en-us/articles/216378603-Meeting-Reporting) on past meetings and webinars for a specified time period. The time range for the report is limited to a month and the month must fall within the past six months.\n\nMeetings and webinars are returned only if they have two or more unique participants.  <br><br>\n**Scopes:** `report:read:admin`<br>\n \n **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Heavy`<br>\n**Prerequisites:**<br>\n* Pro or higher plan."
  },
  "response": [
    {
      "name": "**HTTP Status Code:** `200`<br>\nActive or inactive hosts report returned.<br>\n",
      "originalRequest": {
        "method": "GET",
        "header": [
          {
            "description": "Added as a part of security scheme: oauth2",
            "key": "Authorization",
            "value": "<token>"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/report/users/:userId/meetings?from=1989-05-07&to=1989-05-07&page_size=30&next_page_token=quis officia in reprehenderit&type=past",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "report",
            "users",
            ":userId",
            "meetings"
          ],
          "query": [
            {
              "key": "from",
              "value": "1989-05-07"
            },
            {
              "key": "to",
              "value": "1989-05-07"
            },
            {
              "key": "page_size",
              "value": "30"
            },
            {
              "key": "next_page_token",
              "value": "quis officia in reprehenderit"
            },
            {
              "key": "type",
              "value": "past"
            }
          ],
          "variable": [
            {
              "key": "userId",
              "value": "quis officia in reprehenderit",
              "description": "(Required) The user ID or email address of the user. For user-level apps, pass the `me` value for this parameter."
            }
          ]
        }
      },
      "status": "OK",
      "code": 200,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "\"{\\n    \\\"from\\\": \\\"2019-07-14\\\",\\n    \\\"to\\\": \\\"2019-08-14\\\",\\n    \\\"page_count\\\": 1,\\n    \\\"page_size\\\": 30,\\n    \\\"total_records\\\": 9,\\n    \\\"next_page_token\\\": \\\"\\\",\\n    \\\"meetings\\\": [\\n        {\\n            \\\"uuid\\\": \\\"/lqsAAAA5VBBBw==\\\",\\n            \\\"id\\\": 12345,\\n            \\\"host_id\\\": \\\"gdfg3434dsssfss\\\",\\n            \\\"type\\\": 2,\\n            \\\"topic\\\": \\\"MyTestMeetings\\\",\\n            \\\"user_name\\\": \\\"Prashant Bhandari\\\",\\n            \\\"user_email\\\": \\\"pb@hjdskfhds.fdskhfhds\\\",\\n            \\\"start_time\\\": \\\"2019-07-15T23:24:52Z\\\",\\n            \\\"end_time\\\": \\\"2019-07-15T23:30:19Z\\\",\\n            \\\"duration\\\": 6,\\n            \\\"total_minutes\\\": 11,\\n            \\\"participants_count\\\": 2\\n        },\\n        {\\n            \\\"uuid\\\": \\\"411bbbbbbcVyw==\\\",\\n            \\\"id\\\": 000000,\\n            \\\"host_id\\\": \\\"gdfg3434dsssfss\\\",\\n            \\\"type\\\": 2,\\n            \\\"topic\\\": \\\"My Meeting\\\",\\n            \\\"user_name\\\": \\\"Raju Khanal\\\",\\n            \\\"user_email\\\": \\\"srhkdjfh@jh.fsadghjm\\\",\\n            \\\"start_time\\\": \\\"2019-07-16T17:14:39Z\\\",\\n            \\\"end_time\\\": \\\"2019-07-16T17:26:20Z\\\",\\n            \\\"duration\\\": 12,\\n            \\\"total_minutes\\\": 17,\\n            \\\"participants_count\\\": 2\\n        }\\n    ]\\n}\""
    },
    {
      "name": "**HTTP Status Code:** `400` **Bad Request**<br>\n\n**Error Code:** `200`<br>\nThis is only available for paid account:{accountId}.<br>\n\n**Error Code:** `300`<br>\nThe next page token is invalid or expired.\n\n",
      "originalRequest": {
        "method": "GET",
        "header": [
          {
            "description": "Added as a part of security scheme: oauth2",
            "key": "Authorization",
            "value": "<token>"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/report/users/:userId/meetings?from=1989-05-07&to=1989-05-07&page_size=30&next_page_token=quis officia in reprehenderit&type=past",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "report",
            "users",
            ":userId",
            "meetings"
          ],
          "query": [
            {
              "key": "from",
              "value": "1989-05-07"
            },
            {
              "key": "to",
              "value": "1989-05-07"
            },
            {
              "key": "page_size",
              "value": "30"
            },
            {
              "key": "next_page_token",
              "value": "quis officia in reprehenderit"
            },
            {
              "key": "type",
              "value": "past"
            }
          ],
          "variable": [
            {
              "key": "userId",
              "value": "quis officia in reprehenderit",
              "description": "(Required) The user ID or email address of the user. For user-level apps, pass the `me` value for this parameter."
            }
          ]
        }
      },
      "status": "Bad Request",
      "code": 400,
      "_postman_previewlanguage": "text",
      "header": [
        {
          "key": "Content-Type",
          "value": "text/plain"
        }
      ],
      "cookie": [
      ],
      "body": ""
    },
    {
      "name": "**HTTP Status Code:** `404` **Not Found**\n<br>**Error Code:** `1001`<br>\nUser {userId} not exist or not belong to this account.",
      "originalRequest": {
        "method": "GET",
        "header": [
          {
            "description": "Added as a part of security scheme: oauth2",
            "key": "Authorization",
            "value": "<token>"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/report/users/:userId/meetings?from=1989-05-07&to=1989-05-07&page_size=30&next_page_token=quis officia in reprehenderit&type=past",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "report",
            "users",
            ":userId",
            "meetings"
          ],
          "query": [
            {
              "key": "from",
              "value": "1989-05-07"
            },
            {
              "key": "to",
              "value": "1989-05-07"
            },
            {
              "key": "page_size",
              "value": "30"
            },
            {
              "key": "next_page_token",
              "value": "quis officia in reprehenderit"
            },
            {
              "key": "type",
              "value": "past"
            }
          ],
          "variable": [
            {
              "key": "userId",
              "value": "quis officia in reprehenderit",
              "description": "(Required) The user ID or email address of the user. For user-level apps, pass the `me` value for this parameter."
            }
          ]
        }
      },
      "status": "Not Found",
      "code": 404,
      "_postman_previewlanguage": "text",
      "header": [
        {
          "key": "Content-Type",
          "value": "text/plain"
        }
      ],
      "cookie": [
      ],
      "body": ""
    }
  ]
}