SQL Server / Zoom API / Get a webinar
Back to Collection Items
-- Important: See this note about string length limitations for strings returned by sp_OAMethod calls.
--
CREATE PROCEDURE ChilkatSample
AS
BEGIN
DECLARE @hr int
DECLARE @iTmp0 int
-- Important: Do not use nvarchar(max). See the warning about using nvarchar(max).
DECLARE @sTmp0 nvarchar(4000)
-- This example assumes the Chilkat API to have been previously unlocked.
-- See Global Unlock Sample for sample code.
DECLARE @http int
-- Use "Chilkat_9_5_0.Http" for versions of Chilkat < 10.0.0
EXEC @hr = sp_OACreate 'Chilkat.Http', @http OUT
IF @hr <> 0
BEGIN
PRINT 'Failed to create ActiveX component'
RETURN
END
DECLARE @success int
DECLARE @queryParams int
-- Use "Chilkat_9_5_0.JsonObject" for versions of Chilkat < 10.0.0
EXEC @hr = sp_OACreate 'Chilkat.JsonObject', @queryParams OUT
EXEC sp_OAMethod @queryParams, 'UpdateString', @success OUT, 'occurrence_id', 'quis officia in reprehenderit'
EXEC sp_OAMethod @queryParams, 'UpdateString', @success OUT, 'show_previous_occurrences', 'true'
-- Adds the "Authorization: Bearer <access_token>" header.
EXEC sp_OASetProperty @http, 'AuthToken', '<access_token>'
DECLARE @resp int
EXEC sp_OAMethod @http, 'QuickRequestParams', @resp OUT, 'GET', 'https://api.zoom.us/v2/webinars/:webinarId', @queryParams
EXEC sp_OAGetProperty @http, 'LastMethodSuccess', @iTmp0 OUT
IF @iTmp0 = 0
BEGIN
EXEC sp_OAGetProperty @http, 'LastErrorText', @sTmp0 OUT
PRINT @sTmp0
EXEC @hr = sp_OADestroy @http
EXEC @hr = sp_OADestroy @queryParams
RETURN
END
DECLARE @sbResponseBody int
-- Use "Chilkat_9_5_0.StringBuilder" for versions of Chilkat < 10.0.0
EXEC @hr = sp_OACreate 'Chilkat.StringBuilder', @sbResponseBody OUT
EXEC sp_OAMethod @resp, 'GetBodySb', @success OUT, @sbResponseBody
DECLARE @jResp int
-- Use "Chilkat_9_5_0.JsonObject" for versions of Chilkat < 10.0.0
EXEC @hr = sp_OACreate 'Chilkat.JsonObject', @jResp OUT
EXEC sp_OAMethod @jResp, 'LoadSb', @success OUT, @sbResponseBody
EXEC sp_OASetProperty @jResp, 'EmitCompact', 0
PRINT 'Response Body:'
EXEC sp_OAMethod @jResp, 'Emit', @sTmp0 OUT
PRINT @sTmp0
DECLARE @respStatusCode int
EXEC sp_OAGetProperty @resp, 'StatusCode', @respStatusCode OUT
PRINT 'Response Status Code = ' + @respStatusCode
IF @respStatusCode >= 400
BEGIN
PRINT 'Response Header:'
EXEC sp_OAGetProperty @resp, 'Header', @sTmp0 OUT
PRINT @sTmp0
PRINT 'Failed.'
EXEC @hr = sp_OADestroy @resp
EXEC @hr = sp_OADestroy @http
EXEC @hr = sp_OADestroy @queryParams
EXEC @hr = sp_OADestroy @sbResponseBody
EXEC @hr = sp_OADestroy @jResp
RETURN
END
EXEC @hr = sp_OADestroy @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
DECLARE @strVal nvarchar(4000)
DECLARE @city nvarchar(4000)
DECLARE @country nvarchar(4000)
DECLARE @country_name nvarchar(4000)
DECLARE @v_number nvarchar(4000)
DECLARE @v_type_str nvarchar(4000)
DECLARE @created_at nvarchar(4000)
EXEC sp_OAMethod @jResp, 'StringOf', @created_at OUT, 'created_at'
DECLARE @duration int
EXEC sp_OAMethod @jResp, 'IntOf', @duration OUT, 'duration'
DECLARE @host_id nvarchar(4000)
EXEC sp_OAMethod @jResp, 'StringOf', @host_id OUT, 'host_id'
DECLARE @id int
EXEC sp_OAMethod @jResp, 'IntOf', @id OUT, 'id'
DECLARE @join_url nvarchar(4000)
EXEC sp_OAMethod @jResp, 'StringOf', @join_url OUT, 'join_url'
DECLARE @Allow_multiple_devices int
EXEC sp_OAMethod @jResp, 'BoolOf', @Allow_multiple_devices OUT, 'settings.allow_multiple_devices'
DECLARE @Alternative_hosts nvarchar(4000)
EXEC sp_OAMethod @jResp, 'StringOf', @Alternative_hosts OUT, 'settings.alternative_hosts'
DECLARE @Approval_type int
EXEC sp_OAMethod @jResp, 'IntOf', @Approval_type OUT, 'settings.approval_type'
DECLARE @Audio nvarchar(4000)
EXEC sp_OAMethod @jResp, 'StringOf', @Audio OUT, 'settings.audio'
DECLARE @Auto_recording nvarchar(4000)
EXEC sp_OAMethod @jResp, 'StringOf', @Auto_recording OUT, 'settings.auto_recording'
DECLARE @Close_registration int
EXEC sp_OAMethod @jResp, 'BoolOf', @Close_registration OUT, 'settings.close_registration'
DECLARE @Contact_email nvarchar(4000)
EXEC sp_OAMethod @jResp, 'StringOf', @Contact_email OUT, 'settings.contact_email'
DECLARE @Contact_name nvarchar(4000)
EXEC sp_OAMethod @jResp, 'StringOf', @Contact_name OUT, 'settings.contact_name'
DECLARE @Enforce_login int
EXEC sp_OAMethod @jResp, 'BoolOf', @Enforce_login OUT, 'settings.enforce_login'
DECLARE @Enforce_login_domains nvarchar(4000)
EXEC sp_OAMethod @jResp, 'StringOf', @Enforce_login_domains OUT, 'settings.enforce_login_domains'
DECLARE @Hd_video int
EXEC sp_OAMethod @jResp, 'BoolOf', @Hd_video OUT, 'settings.hd_video'
DECLARE @Hd_video_for_attendees int
EXEC sp_OAMethod @jResp, 'BoolOf', @Hd_video_for_attendees OUT, 'settings.hd_video_for_attendees'
DECLARE @Send_1080p_video_to_attendees int
EXEC sp_OAMethod @jResp, 'BoolOf', @Send_1080p_video_to_attendees OUT, 'settings.send_1080p_video_to_attendees'
DECLARE @Host_video int
EXEC sp_OAMethod @jResp, 'BoolOf', @Host_video OUT, 'settings.host_video'
DECLARE @On_demand int
EXEC sp_OAMethod @jResp, 'BoolOf', @On_demand OUT, 'settings.on_demand'
DECLARE @Panelists_video int
EXEC sp_OAMethod @jResp, 'BoolOf', @Panelists_video OUT, 'settings.panelists_video'
DECLARE @Practice_session int
EXEC sp_OAMethod @jResp, 'BoolOf', @Practice_session OUT, 'settings.practice_session'
DECLARE @Question_answer int
EXEC sp_OAMethod @jResp, 'BoolOf', @Question_answer OUT, 'settings.question_answer'
DECLARE @Registrants_confirmation_email int
EXEC sp_OAMethod @jResp, 'BoolOf', @Registrants_confirmation_email OUT, 'settings.registrants_confirmation_email'
DECLARE @Registrants_restrict_number int
EXEC sp_OAMethod @jResp, 'IntOf', @Registrants_restrict_number OUT, 'settings.registrants_restrict_number'
DECLARE @Show_share_button int
EXEC sp_OAMethod @jResp, 'BoolOf', @Show_share_button OUT, 'settings.show_share_button'
DECLARE @Registrants_email_notification int
EXEC sp_OAMethod @jResp, 'BoolOf', @Registrants_email_notification OUT, 'settings.registrants_email_notification'
DECLARE @Email_language nvarchar(4000)
EXEC sp_OAMethod @jResp, 'StringOf', @Email_language OUT, 'settings.email_language'
DECLARE @Panelists_invitation_email_notification int
EXEC sp_OAMethod @jResp, 'BoolOf', @Panelists_invitation_email_notification OUT, 'settings.panelists_invitation_email_notification'
DECLARE @Enable int
EXEC sp_OAMethod @jResp, 'BoolOf', @Enable OUT, 'settings.attendees_and_panelists_reminder_email_notification.enable'
DECLARE @v_Type int
EXEC sp_OAMethod @jResp, 'IntOf', @v_Type OUT, 'settings.attendees_and_panelists_reminder_email_notification.type'
DECLARE @Follow_up_attendees_email_notificationEnable int
EXEC sp_OAMethod @jResp, 'BoolOf', @Follow_up_attendees_email_notificationEnable OUT, 'settings.follow_up_attendees_email_notification.enable'
DECLARE @Follow_up_attendees_email_notificationType int
EXEC sp_OAMethod @jResp, 'IntOf', @Follow_up_attendees_email_notificationType OUT, 'settings.follow_up_attendees_email_notification.type'
DECLARE @Follow_up_absentees_email_notificationEnable int
EXEC sp_OAMethod @jResp, 'BoolOf', @Follow_up_absentees_email_notificationEnable OUT, 'settings.follow_up_absentees_email_notification.enable'
DECLARE @Follow_up_absentees_email_notificationType int
EXEC sp_OAMethod @jResp, 'IntOf', @Follow_up_absentees_email_notificationType OUT, 'settings.follow_up_absentees_email_notification.type'
DECLARE @start_time nvarchar(4000)
EXEC sp_OAMethod @jResp, 'StringOf', @start_time OUT, 'start_time'
DECLARE @start_url nvarchar(4000)
EXEC sp_OAMethod @jResp, 'StringOf', @start_url OUT, 'start_url'
DECLARE @timezone nvarchar(4000)
EXEC sp_OAMethod @jResp, 'StringOf', @timezone OUT, 'timezone'
DECLARE @topic nvarchar(4000)
EXEC sp_OAMethod @jResp, 'StringOf', @topic OUT, 'topic'
DECLARE @v_type int
EXEC sp_OAMethod @jResp, 'IntOf', @v_type OUT, 'type'
DECLARE @uuid nvarchar(4000)
EXEC sp_OAMethod @jResp, 'StringOf', @uuid OUT, 'uuid'
DECLARE @i int
SELECT @i = 0
DECLARE @count_i int
EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_i OUT, 'settings.global_dial_in_countries'
WHILE @i < @count_i
BEGIN
EXEC sp_OASetProperty @jResp, 'I', @i
EXEC sp_OAMethod @jResp, 'StringOf', @strVal OUT, 'settings.global_dial_in_countries[i]'
SELECT @i = @i + 1
END
SELECT @i = 0
EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_i OUT, 'settings.global_dial_in_numbers'
WHILE @i < @count_i
BEGIN
EXEC sp_OASetProperty @jResp, 'I', @i
EXEC sp_OAMethod @jResp, 'StringOf', @city OUT, 'settings.global_dial_in_numbers[i].city'
EXEC sp_OAMethod @jResp, 'StringOf', @country OUT, 'settings.global_dial_in_numbers[i].country'
EXEC sp_OAMethod @jResp, 'StringOf', @country_name OUT, 'settings.global_dial_in_numbers[i].country_name'
EXEC sp_OAMethod @jResp, 'StringOf', @v_number OUT, 'settings.global_dial_in_numbers[i].number'
EXEC sp_OAMethod @jResp, 'StringOf', @v_type_str OUT, 'settings.global_dial_in_numbers[i].type'
SELECT @i = @i + 1
END
EXEC @hr = sp_OADestroy @http
EXEC @hr = sp_OADestroy @queryParams
EXEC @hr = sp_OADestroy @sbResponseBody
EXEC @hr = sp_OADestroy @jResp
END
GO
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": ""
}
]
}