Chilkat Online Tools

PowerBuilder / Zoom API / Get a webinar

Back to Collection Items

integer li_rc
oleobject loo_Http
integer li_Success
oleobject loo_QueryParams
oleobject loo_Resp
oleobject loo_SbResponseBody
oleobject loo_JResp
integer li_RespStatusCode
string ls_StrVal
string ls_City
string ls_Country
string ls_Country_name
string ls_V_number
string ls_V_type_str
string ls_Created_at
integer li_Duration
string ls_Host_id
integer li_Id
string ls_Join_url
integer li_Allow_multiple_devices
string ls_Alternative_hosts
integer li_Approval_type
string ls_Audio
string ls_Auto_recording
integer li_Close_registration
string ls_Contact_email
string ls_Contact_name
integer li_Enforce_login
string ls_Enforce_login_domains
integer li_Hd_video
integer li_Hd_video_for_attendees
integer li_Send_1080p_video_to_attendees
integer li_Host_video
integer li_On_demand
integer li_Panelists_video
integer li_Practice_session
integer li_Question_answer
integer li_Registrants_confirmation_email
integer li_Registrants_restrict_number
integer li_Show_share_button
integer li_Registrants_email_notification
string ls_Email_language
integer li_Panelists_invitation_email_notification
integer li_Enable
integer li_V_Type
integer li_Follow_up_attendees_email_notificationEnable
integer li_Follow_up_attendees_email_notificationType
integer li_Follow_up_absentees_email_notificationEnable
integer li_Follow_up_absentees_email_notificationType
string ls_Start_time
string ls_Start_url
string ls_Timezone
string ls_Topic
integer li_V_type
string ls_Uuid
integer i
integer li_Count_i

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

loo_Http = create oleobject
li_rc = loo_Http.ConnectToNewObject("Chilkat_9_5_0.Http")
if li_rc < 0 then
    destroy loo_Http
    MessageBox("Error","Connecting to COM object failed")
    return
end if

loo_QueryParams = create oleobject
li_rc = loo_QueryParams.ConnectToNewObject("Chilkat_9_5_0.JsonObject")

loo_QueryParams.UpdateString("occurrence_id","quis officia in reprehenderit")
loo_QueryParams.UpdateString("show_previous_occurrences","true")

// Adds the "Authorization: Bearer <access_token>" header.
loo_Http.AuthToken = "<access_token>"

loo_Resp = loo_Http.QuickRequestParams("GET","https://api.zoom.us/v2/webinars/:webinarId",loo_QueryParams)
if loo_Http.LastMethodSuccess = 0 then
    Write-Debug loo_Http.LastErrorText
    destroy loo_Http
    destroy loo_QueryParams
    return
end if

loo_SbResponseBody = create oleobject
li_rc = loo_SbResponseBody.ConnectToNewObject("Chilkat_9_5_0.StringBuilder")

loo_Resp.GetBodySb(loo_SbResponseBody)

loo_JResp = create oleobject
li_rc = loo_JResp.ConnectToNewObject("Chilkat_9_5_0.JsonObject")

loo_JResp.LoadSb(loo_SbResponseBody)
loo_JResp.EmitCompact = 0

Write-Debug "Response Body:"
Write-Debug loo_JResp.Emit()

li_RespStatusCode = loo_Resp.StatusCode
Write-Debug "Response Status Code = " + string(li_RespStatusCode)
if li_RespStatusCode >= 400 then
    Write-Debug "Response Header:"
    Write-Debug loo_Resp.Header
    Write-Debug "Failed."
    destroy loo_Resp
    destroy loo_Http
    destroy loo_QueryParams
    destroy loo_SbResponseBody
    destroy loo_JResp
    return
end if

destroy loo_Resp

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

// {
//   "created_at": "2019-09-13T15:35:00Z",
//   "duration": 60,
//   "host_id": "Labcjskdfsjgfg",
//   "id": 12345678,
//   "join_url": "https://zoom.us/j/12345678",
//   "settings": {
//     "allow_multiple_devices": true,
//     "alternative_hosts": "",
//     "approval_type": 2,
//     "audio": "both",
//     "auto_recording": "local",
//     "close_registration": true,
//     "contact_email": "example@example.com",
//     "contact_name": "Amal",
//     "enforce_login": false,
//     "enforce_login_domains": "",
//     "global_dial_in_countries": [
//       "US"
//     ],
//     "global_dial_in_numbers": [
//       {
//         "city": "New York",
//         "country": "US",
//         "country_name": "US",
//         "number": "+1 00000",
//         "type": "toll"
//       },
//       {
//         "city": "San Jose",
//         "country": "US",
//         "country_name": "US",
//         "number": "+1 111111111",
//         "type": "toll"
//       },
//       {
//         "city": "San Jose",
//         "country": "US",
//         "country_name": "US",
//         "number": "+1 11111110",
//         "type": "toll"
//       }
//     ],
//     "hd_video": false,
//     "hd_video_for_attendees": false,
//     "send_1080p_video_to_attendees": false,
//     "host_video": false,
//     "on_demand": false,
//     "panelists_video": false,
//     "practice_session": false,
//     "question_answer": true,
//     "registrants_confirmation_email": true,
//     "registrants_restrict_number": 0,
//     "show_share_button": true,
//     "registrants_email_notification": true,
//     "email_language": "en-US",
//     "panelists_invitation_email_notification": true,
//     "attendees_and_panelists_reminder_email_notification": {
//       "enable": true,
//       "type": 1
//     },
//     "follow_up_attendees_email_notification": {
//       "enable": true,
//       "type": 1
//     },
//     "follow_up_absentees_email_notification": {
//       "enable": true,
//       "type": 1
//     }
//   },
//   "start_time": "2019-08-30T22:00:00Z",
//   "start_url": "https://zoom.us/s/00000011110?zhghTlUT1Rjd2FXRgh0amxoejNQZ1EiLCJjaWQiOiIifQ.NJ0CXWQ-yhI8Xv01JvxityBtzp3Bt7odMOEG2L8DLmY",
//   "timezone": "America/New_York",
//   "topic": "Test Webinar",
//   "type": 5,
//   "uuid": "nWMHAAAAAAAAAAAAAUDP1A=="
// }

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

ls_Created_at = loo_JResp.StringOf("created_at")
li_Duration = loo_JResp.IntOf("duration")
ls_Host_id = loo_JResp.StringOf("host_id")
li_Id = loo_JResp.IntOf("id")
ls_Join_url = loo_JResp.StringOf("join_url")
li_Allow_multiple_devices = loo_JResp.BoolOf("settings.allow_multiple_devices")
ls_Alternative_hosts = loo_JResp.StringOf("settings.alternative_hosts")
li_Approval_type = loo_JResp.IntOf("settings.approval_type")
ls_Audio = loo_JResp.StringOf("settings.audio")
ls_Auto_recording = loo_JResp.StringOf("settings.auto_recording")
li_Close_registration = loo_JResp.BoolOf("settings.close_registration")
ls_Contact_email = loo_JResp.StringOf("settings.contact_email")
ls_Contact_name = loo_JResp.StringOf("settings.contact_name")
li_Enforce_login = loo_JResp.BoolOf("settings.enforce_login")
ls_Enforce_login_domains = loo_JResp.StringOf("settings.enforce_login_domains")
li_Hd_video = loo_JResp.BoolOf("settings.hd_video")
li_Hd_video_for_attendees = loo_JResp.BoolOf("settings.hd_video_for_attendees")
li_Send_1080p_video_to_attendees = loo_JResp.BoolOf("settings.send_1080p_video_to_attendees")
li_Host_video = loo_JResp.BoolOf("settings.host_video")
li_On_demand = loo_JResp.BoolOf("settings.on_demand")
li_Panelists_video = loo_JResp.BoolOf("settings.panelists_video")
li_Practice_session = loo_JResp.BoolOf("settings.practice_session")
li_Question_answer = loo_JResp.BoolOf("settings.question_answer")
li_Registrants_confirmation_email = loo_JResp.BoolOf("settings.registrants_confirmation_email")
li_Registrants_restrict_number = loo_JResp.IntOf("settings.registrants_restrict_number")
li_Show_share_button = loo_JResp.BoolOf("settings.show_share_button")
li_Registrants_email_notification = loo_JResp.BoolOf("settings.registrants_email_notification")
ls_Email_language = loo_JResp.StringOf("settings.email_language")
li_Panelists_invitation_email_notification = loo_JResp.BoolOf("settings.panelists_invitation_email_notification")
li_Enable = loo_JResp.BoolOf("settings.attendees_and_panelists_reminder_email_notification.enable")
li_V_Type = loo_JResp.IntOf("settings.attendees_and_panelists_reminder_email_notification.type")
li_Follow_up_attendees_email_notificationEnable = loo_JResp.BoolOf("settings.follow_up_attendees_email_notification.enable")
li_Follow_up_attendees_email_notificationType = loo_JResp.IntOf("settings.follow_up_attendees_email_notification.type")
li_Follow_up_absentees_email_notificationEnable = loo_JResp.BoolOf("settings.follow_up_absentees_email_notification.enable")
li_Follow_up_absentees_email_notificationType = loo_JResp.IntOf("settings.follow_up_absentees_email_notification.type")
ls_Start_time = loo_JResp.StringOf("start_time")
ls_Start_url = loo_JResp.StringOf("start_url")
ls_Timezone = loo_JResp.StringOf("timezone")
ls_Topic = loo_JResp.StringOf("topic")
li_V_type = loo_JResp.IntOf("type")
ls_Uuid = loo_JResp.StringOf("uuid")
i = 0
li_Count_i = loo_JResp.SizeOfArray("settings.global_dial_in_countries")
do while i < li_Count_i
    loo_JResp.I = i
    ls_StrVal = loo_JResp.StringOf("settings.global_dial_in_countries[i]")
    i = i + 1
loop
i = 0
li_Count_i = loo_JResp.SizeOfArray("settings.global_dial_in_numbers")
do while i < li_Count_i
    loo_JResp.I = i
    ls_City = loo_JResp.StringOf("settings.global_dial_in_numbers[i].city")
    ls_Country = loo_JResp.StringOf("settings.global_dial_in_numbers[i].country")
    ls_Country_name = loo_JResp.StringOf("settings.global_dial_in_numbers[i].country_name")
    ls_V_number = loo_JResp.StringOf("settings.global_dial_in_numbers[i].number")
    ls_V_type_str = loo_JResp.StringOf("settings.global_dial_in_numbers[i].type")
    i = i + 1
loop


destroy loo_Http
destroy loo_QueryParams
destroy loo_SbResponseBody
destroy loo_JResp

Curl Command

curl -G -d "occurrence_id=quis%20officia%20in%20reprehenderit"
	-d "show_previous_occurrences=true"
	-H "Authorization: Bearer <access_token>"
https://api.zoom.us/v2/webinars/:webinarId

Postman Collection Item JSON

{
  "name": "Get a webinar",
  "request": {
    "auth": {
      "type": "oauth2"
    },
    "method": "GET",
    "header": [
    ],
    "url": {
      "raw": "{{baseUrl}}/webinars/:webinarId?occurrence_id=quis officia in reprehenderit&show_previous_occurrences=true",
      "host": [
        "{{baseUrl}}"
      ],
      "path": [
        "webinars",
        ":webinarId"
      ],
      "query": [
        {
          "key": "occurrence_id",
          "value": "quis officia in reprehenderit",
          "description": "Unique Identifier that identifies an occurrence of a recurring webinar. [Recurring webinars](https://support.zoom.us/hc/en-us/articles/216354763-How-to-Schedule-A-Recurring-Webinar) can have a maximum of 50 occurrences. When you create a recurring Webinar using [Create a Webinar API](https://marketplace.zoom.us/docs/api-reference/zoom-api/webinars/webinarcreate), you can retrieve the Occurrence ID from the response of the API call."
        },
        {
          "key": "show_previous_occurrences",
          "value": "true",
          "description": "Set the value of this field to `true` if you would like to view Webinar details of all previous occurrences of a recurring Webinar."
        }
      ],
      "variable": [
        {
          "key": "webinarId",
          "value": "quis officia in reprehenderit",
          "description": "(Required) The webinar's ID or universally unique ID (UUID)."
        }
      ]
    },
    "description": "Zoom users with a [Webinar Plan](https://zoom.us/webinar) have access to creating and managing Webinars. Webinar allows a host to broadcast a Zoom meeting to up to 10,000 attendees.<br>Use this API to get details of a scheduled webinar.<br><br>\n**Scopes:** `webinar:read:admin` `webinar:read`<br> \n **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Light`<br>**Prerequisites:**\n* Pro or higher plan with a Webinar Add-on."
  },
  "response": [
    {
      "name": "**HTTP Status Code:** `200`<br>\nSuccess",
      "originalRequest": {
        "method": "GET",
        "header": [
          {
            "description": "Added as a part of security scheme: oauth2",
            "key": "Authorization",
            "value": "<token>"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/webinars/:webinarId?occurrence_id=quis officia in reprehenderit&show_previous_occurrences=true",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "webinars",
            ":webinarId"
          ],
          "query": [
            {
              "key": "occurrence_id",
              "value": "quis officia in reprehenderit"
            },
            {
              "key": "show_previous_occurrences",
              "value": "true"
            }
          ],
          "variable": [
            {
              "key": "webinarId",
              "value": "quis officia in reprehenderit",
              "description": "(Required) The webinar's ID or universally unique ID (UUID)."
            }
          ]
        }
      },
      "status": "OK",
      "code": 200,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "{\n \"created_at\": \"2019-09-13T15:35:00Z\",\n \"duration\": 60,\n \"host_id\": \"Labcjskdfsjgfg\",\n \"id\": 12345678,\n \"join_url\": \"https://zoom.us/j/12345678\",\n \"settings\": {\n  \"allow_multiple_devices\": true,\n  \"alternative_hosts\": \"\",\n  \"approval_type\": 2,\n  \"audio\": \"both\",\n  \"auto_recording\": \"local\",\n  \"close_registration\": true,\n  \"contact_email\": \"example@example.com\",\n  \"contact_name\": \"Amal\",\n  \"enforce_login\": false,\n  \"enforce_login_domains\": \"\",\n  \"global_dial_in_countries\": [\n   \"US\"\n  ],\n  \"global_dial_in_numbers\": [\n   {\n    \"city\": \"New York\",\n    \"country\": \"US\",\n    \"country_name\": \"US\",\n    \"number\": \"+1 00000\",\n    \"type\": \"toll\"\n   },\n   {\n    \"city\": \"San Jose\",\n    \"country\": \"US\",\n    \"country_name\": \"US\",\n    \"number\": \"+1 111111111\",\n    \"type\": \"toll\"\n   },\n   {\n    \"city\": \"San Jose\",\n    \"country\": \"US\",\n    \"country_name\": \"US\",\n    \"number\": \"+1 11111110\",\n    \"type\": \"toll\"\n   }\n  ],\n  \"hd_video\": false,\n  \"hd_video_for_attendees\": false,\n  \"send_1080p_video_to_attendees\": false,\n  \"host_video\": false,\n  \"on_demand\": false,\n  \"panelists_video\": false,\n  \"practice_session\": false,\n  \"question_answer\": true,\n  \"registrants_confirmation_email\": true,\n  \"registrants_restrict_number\": 0,\n  \"show_share_button\": true,\n  \"registrants_email_notification\": true,\n  \"email_language\": \"en-US\",\n  \"panelists_invitation_email_notification\": true,\n  \"attendees_and_panelists_reminder_email_notification\": {\n   \"enable\": true,\n   \"type\": 1\n  },\n  \"follow_up_attendees_email_notification\": {\n   \"enable\": true,\n   \"type\": 1\n  },\n  \"follow_up_absentees_email_notification\": {\n   \"enable\": true,\n   \"type\": 1\n  }\n },\n \"start_time\": \"2019-08-30T22:00:00Z\",\n \"start_url\": \"https://zoom.us/s/00000011110?zhghTlUT1Rjd2FXRgh0amxoejNQZ1EiLCJjaWQiOiIifQ.NJ0CXWQ-yhI8Xv01JvxityBtzp3Bt7odMOEG2L8DLmY\",\n \"timezone\": \"America/New_York\",\n \"topic\": \"Test Webinar\",\n \"type\": 5,\n \"uuid\": \"nWMHAAAAAAAAAAAAAUDP1A==\"\n}"
    },
    {
      "name": "**HTTP Status Code:** `300`<br>Invalid webinar ID.",
      "originalRequest": {
        "method": "GET",
        "header": [
          {
            "description": "Added as a part of security scheme: oauth2",
            "key": "Authorization",
            "value": "<token>"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/webinars/:webinarId?occurrence_id=quis officia in reprehenderit&show_previous_occurrences=true",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "webinars",
            ":webinarId"
          ],
          "query": [
            {
              "key": "occurrence_id",
              "value": "quis officia in reprehenderit"
            },
            {
              "key": "show_previous_occurrences",
              "value": "true"
            }
          ],
          "variable": [
            {
              "key": "webinarId",
              "value": "quis officia in reprehenderit",
              "description": "(Required) The webinar's ID or universally unique ID (UUID)."
            }
          ]
        }
      },
      "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}}/webinars/:webinarId?occurrence_id=quis officia in reprehenderit&show_previous_occurrences=true",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "webinars",
            ":webinarId"
          ],
          "query": [
            {
              "key": "occurrence_id",
              "value": "quis officia in reprehenderit"
            },
            {
              "key": "show_previous_occurrences",
              "value": "true"
            }
          ],
          "variable": [
            {
              "key": "webinarId",
              "value": "quis officia in reprehenderit",
              "description": "(Required) The webinar's ID or universally unique ID (UUID)."
            }
          ]
        }
      },
      "status": "Bad Request",
      "code": 400,
      "_postman_previewlanguage": "text",
      "header": [
        {
          "key": "Content-Type",
          "value": "text/plain"
        }
      ],
      "cookie": [
      ],
      "body": ""
    },
    {
      "name": "**HTTP Status Code:** `404`<br>\nWebinar not found.<br>\n**Error Code:** `1001`<br>\nUser {userId} does not exist or does not belong to this account.<br>\n**Error Code:** `3001`<br>\nWebinar {webinarId} 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}}/webinars/:webinarId?occurrence_id=quis officia in reprehenderit&show_previous_occurrences=true",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "webinars",
            ":webinarId"
          ],
          "query": [
            {
              "key": "occurrence_id",
              "value": "quis officia in reprehenderit"
            },
            {
              "key": "show_previous_occurrences",
              "value": "true"
            }
          ],
          "variable": [
            {
              "key": "webinarId",
              "value": "quis officia in reprehenderit",
              "description": "(Required) The webinar's ID or universally unique ID (UUID)."
            }
          ]
        }
      },
      "status": "Not Found",
      "code": 404,
      "_postman_previewlanguage": "text",
      "header": [
        {
          "key": "Content-Type",
          "value": "text/plain"
        }
      ],
      "cookie": [
      ],
      "body": ""
    }
  ]
}