Chilkat Online Tools

C++ / Zoom API / List tracking fields

Back to Collection Items

#include <CkHttp.h>
#include <CkStringBuilder.h>
#include <CkJsonObject.h>

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

    CkHttp http;
    bool success;

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

    CkStringBuilder sbResponseBody;
    success = http.QuickGetSb("https://api.zoom.us/v2/tracking_fields",sbResponseBody);
    if (success == false) {
        std::cout << http.lastErrorText() << "\r\n";
        return;
    }

    CkJsonObject jResp;
    jResp.LoadSb(sbResponseBody);
    jResp.put_EmitCompact(false);

    std::cout << "Response Body:" << "\r\n";
    std::cout << jResp.emit() << "\r\n";

    int respStatusCode = http.get_LastStatus();
    std::cout << "Response Status Code = " << respStatusCode << "\r\n";
    if (respStatusCode >= 400) {
        std::cout << "Response Header:" << "\r\n";
        std::cout << http.lastHeader() << "\r\n";
        std::cout << "Failed." << "\r\n";
        return;
    }
    }

Curl Command

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

Postman Collection Item JSON

{
  "name": "List tracking fields",
  "request": {
    "auth": {
      "type": "oauth2"
    },
    "method": "GET",
    "header": [
    ],
    "url": {
      "raw": "{{baseUrl}}/tracking_fields",
      "host": [
        "{{baseUrl}}"
      ],
      "path": [
        "tracking_fields"
      ]
    },
    "description": "Use this API to list all the [tracking fields](https://support.zoom.us/hc/en-us/articles/115000293426-Scheduling-Tracking-Fields) on your Zoom account. Tracking fields let you analyze usage by various fields within an organization. \n\n**Scopes:** `tracking_fields:read:admin` <br> **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Medium` \n\n**Prerequisites:** \n* A Business, Education, API or higher plan."
  },
  "response": [
    {
      "name": "**HTTP Status Code:** `200`<br>\nList of Tracking Fields returned.",
      "originalRequest": {
        "method": "GET",
        "header": [
          {
            "description": "Added as a part of security scheme: oauth2",
            "key": "Authorization",
            "value": "<token>"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/tracking_fields",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "tracking_fields"
          ]
        }
      },
      "status": "OK",
      "code": 200,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "\"{\\n  \\\"total_records\\\": 1,\\n  \\\"tracking_fields\\\": [\\n  {\\n  \\\"id\\\": \\\"3746374637\\\",\\n  \\\"field\\\": \\\"Meeting Purpose\\\",\\n  \\\"required\\\": true,\\n  \\\"visible\\\": false,\\n  \\\"recommended_values\\\": [\\n    \\\"Support\\\",\\n    \\\"Onboarding\\\",\\n    \\\"Sales\\\",\\n    \\\"Other\\\"\\n  ]\\n}\\n}\""
    }
  ]
}