Chilkat Online Tools

DataFlex / Zoom API / Get webinar details

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 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

    // 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" 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


End_Procedure

Curl Command

curl -G -d "type=live"
	-H "Authorization: Bearer <access_token>"
https://api.zoom.us/v2/metrics/webinars/:webinarId

Postman Collection Item JSON

{
  "name": "Get webinar details",
  "request": {
    "auth": {
      "type": "oauth2"
    },
    "method": "GET",
    "header": [
    ],
    "url": {
      "raw": "{{baseUrl}}/metrics/webinars/:webinarId?type=live",
      "host": [
        "{{baseUrl}}"
      ],
      "path": [
        "metrics",
        "webinars",
        ":webinarId"
      ],
      "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`."
        }
      ],
      "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": "Retrieve details from live or past webinars.<br><br>\n**Scopes:** `dashboard_webinars:read:admin`<br>\n **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Heavy`<br>\n**Prerequisites:**<br>\n* Business, Education or API Plan with Webinar add-on.\n\n"
  },
  "response": [
    {
      "name": "**HTTP Status Code:** `200`<br>\nWebinar details returned.<br>\nOnly available for paid accounts that have enabled the Dashboard feature.",
      "originalRequest": {
        "method": "GET",
        "header": [
          {
            "description": "Added as a part of security scheme: oauth2",
            "key": "Authorization",
            "value": "<token>"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/metrics/webinars/:webinarId?type=live",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "metrics",
            "webinars",
            ":webinarId"
          ],
          "query": [
            {
              "key": "type",
              "value": "live"
            }
          ],
          "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    \\\"uuid\\\": \\\"CJaaaaaaaEV6A==\\\",\\n    \\\"id\\\": 00001,\\n    \\\"topic\\\": \\\"MyTestWebinar\\\",\\n    \\\"host\\\": \\\"Henry Chao\\\",\\n    \\\"email\\\": \\\"hc@sdfdfdsfdfsdf.com\\\",\\n    \\\"user_type\\\": \\\"Pro|Webinar1000\\\",\\n    \\\"start_time\\\": \\\"2019-07-16T17:14:39Z\\\",\\n    \\\"end_time\\\": \\\"2019-07-16T17:26:20Z\\\",\\n    \\\"duration\\\": 12,\\n    \\\"participants\\\": 1,\\n    \\\"has_pstn\\\": false,\\n    \\\"has_voip\\\": false,\\n    \\\"has_3rd_party_audio\\\": false,\\n    \\\"has_video\\\": false,\\n    \\\"has_screen_share\\\": false,\\n    \\\"has_recording\\\": false,\\n    \\\"has_sip\\\": false\\n    \\\"has_archiving\\\": false\\n}\""
    },
    {
      "name": "**Error Code:** `200`<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?type=live",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "metrics",
            "webinars",
            ":webinarId"
          ],
          "query": [
            {
              "key": "type",
              "value": "live"
            }
          ],
          "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>\nThe webinar has not ended yet or the Webinar ID is not valid.<br>\nThis webinar's detail is not available.",
      "originalRequest": {
        "method": "GET",
        "header": [
          {
            "description": "Added as a part of security scheme: oauth2",
            "key": "Authorization",
            "value": "<token>"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/metrics/webinars/:webinarId?type=live",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "metrics",
            "webinars",
            ":webinarId"
          ],
          "query": [
            {
              "key": "type",
              "value": "live"
            }
          ],
          "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": ""
    }
  ]
}