Chilkat Online Tools

C / Zoom API / Get meeting detail reports

Back to Collection Items

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

void ChilkatSample(void)
    {
    HCkHttp http;
    BOOL success;
    HCkStringBuilder sbResponseBody;
    HCkJsonObject jResp;
    int respStatusCode;
    const char *field;
    const char *value;
    const char *uuid;
    int id;
    int v_type;
    const char *topic;
    const char *user_name;
    const char *user_email;
    const char *start_time;
    const char *end_time;
    int duration;
    int total_minutes;
    int participants_count;
    int i;
    int count_i;

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

    http = CkHttp_Create();

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

    sbResponseBody = CkStringBuilder_Create();
    success = CkHttp_QuickGetSb(http,"https://api.zoom.us/v2/report/meetings/:meetingId",sbResponseBody);
    if (success == FALSE) {
        printf("%s\n",CkHttp_lastErrorText(http));
        CkHttp_Dispose(http);
        CkStringBuilder_Dispose(sbResponseBody);
        return;
    }

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

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

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

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

    // {
    //   "uuid": "sfsdfsdfc6122222d",
    //   "id": 1000000,
    //   "type": 2,
    //   "topic": "Awesome meeting",
    //   "user_name": "officia",
    //   "user_email": "example@example.com",
    //   "start_time": "2019-07-14T09:05:19.754Z",
    //   "end_time": "2019-08-14T09:05:19.754Z",
    //   "duration": 11,
    //   "total_minutes": 11,
    //   "participants_count": 4,
    //   "tracking_fields": [
    //     {
    //       "field": "Meeting Purpose",
    //       "value": "Sales"
    //     }
    //   ]
    // }

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

    // Chilkat functions returning "const char *" return a pointer to temporary internal memory owned and managed by Chilkat.

    uuid = CkJsonObject_stringOf(jResp,"uuid");
    id = CkJsonObject_IntOf(jResp,"id");
    v_type = CkJsonObject_IntOf(jResp,"type");
    topic = CkJsonObject_stringOf(jResp,"topic");
    user_name = CkJsonObject_stringOf(jResp,"user_name");
    user_email = CkJsonObject_stringOf(jResp,"user_email");
    start_time = CkJsonObject_stringOf(jResp,"start_time");
    end_time = CkJsonObject_stringOf(jResp,"end_time");
    duration = CkJsonObject_IntOf(jResp,"duration");
    total_minutes = CkJsonObject_IntOf(jResp,"total_minutes");
    participants_count = CkJsonObject_IntOf(jResp,"participants_count");
    i = 0;
    count_i = CkJsonObject_SizeOfArray(jResp,"tracking_fields");
    while (i < count_i) {
        CkJsonObject_putI(jResp,i);
        field = CkJsonObject_stringOf(jResp,"tracking_fields[i].field");
        value = CkJsonObject_stringOf(jResp,"tracking_fields[i].value");
        i = i + 1;
    }



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

    }

Curl Command

curl -X GET
	-H "Authorization: Bearer <access_token>"
https://api.zoom.us/v2/report/meetings/:meetingId

Postman Collection Item JSON

{
  "name": "Get meeting detail reports",
  "request": {
    "auth": {
      "type": "oauth2"
    },
    "method": "GET",
    "header": [
    ],
    "url": {
      "raw": "{{baseUrl}}/report/meetings/:meetingId",
      "host": [
        "{{baseUrl}}"
      ],
      "path": [
        "report",
        "meetings",
        ":meetingId"
      ],
      "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": "Get a detailed report for a past meeting. <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 a higher plan.<br>\n "
  },
  "response": [
    {
      "name": "**HTTP Status Code:** `200`<br>\nMeeting details 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",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "report",
            "meetings",
            ":meetingId"
          ],
          "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 \"uuid\": \"sfsdfsdfc6122222d\",\n \"id\": 1000000,\n \"type\": 2,\n \"topic\": \"Awesome meeting\",\n \"user_name\": \"officia\",\n \"user_email\": \"example@example.com\",\n \"start_time\": \"2019-07-14T09:05:19.754Z\",\n \"end_time\": \"2019-08-14T09:05:19.754Z\",\n \"duration\": 11,\n \"total_minutes\": 11,\n \"participants_count\": 4,\n \"tracking_fields\": [\n  {\n   \"field\": \"Meeting Purpose\",\n   \"value\": \"Sales\"\n  }\n ]\n}"
    },
    {
      "name": "**HTTP Status Code:** `300`<br>\nCan not access meeting information:{meetingId}.",
      "originalRequest": {
        "method": "GET",
        "header": [
          {
            "description": "Added as a part of security scheme: oauth2",
            "key": "Authorization",
            "value": "<token>"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/report/meetings/:meetingId",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "report",
            "meetings",
            ":meetingId"
          ],
          "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>",
      "originalRequest": {
        "method": "GET",
        "header": [
          {
            "description": "Added as a part of security scheme: oauth2",
            "key": "Authorization",
            "value": "<token>"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/report/meetings/:meetingId",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "report",
            "meetings",
            ":meetingId"
          ],
          "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",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "report",
            "meetings",
            ":meetingId"
          ],
          "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": ""
    }
  ]
}