SQL Server / Zoom API / Get meeting recordings
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, 'include_fields', 'quis officia in reprehenderit'
EXEC sp_OAMethod @queryParams, 'UpdateInt', @success OUT, 'ttl', 20600
-- 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/meetings/:meetingId/recordings', @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)
-- {
-- "uuid": "gkABCDEbbbbbbbkPuA==",
-- "id": 68000000031879,
-- "account_id": "EABkdslfBBBdk",
-- "host_id": "z8yBXksaAAjdhfsfdfkjgg",
-- "topic": "MyTestPollMeeting",
-- "type": 2,
-- "start_time": "2019-08-29T21:54:49Z",
-- "timezone": "America/Los_Angeles",
-- "duration": 1,
-- "total_size": 74596,
-- "recording_count": 4,
-- "share_url": "https://api.zoom.us/recording/share/abcdkhfdbbfdjbg",
-- "recording_files": [
-- {
-- "id": "96119skjlfhdshkjf-djkfndjf0-f791",
-- "meeting_id": "gkABCDEbbbbbbbkPuA==",
-- "recording_start": "2019-08-29T21:54:55Z",
-- "recording_end": "2019-08-29T21:55:24Z",
-- "file_type": "MP4",
-- "file_size": 37285,
-- "play_url": "https://api.zoom.us/recording/play/Qg75t7xZBtEbAkjdlgbfdngBBBB",
-- "download_url": "https://api.zoom.us/recording/download/Qg75t7xZBtEbAkjdlgbfdngBBBB",
-- "status": "completed",
-- "recording_type": "shared_screen_with_speaker_view"
-- },
-- {
-- "id": "5890sfjkdsf-aaaakdf-fbbb618718e",
-- "meeting_id": "gkABCDEbbbbbbbkPuA==",
-- "recording_start": "2019-08-29T21:54:55Z",
-- "recording_end": "2019-08-29T21:55:24Z",
-- "file_type": "M4A",
-- "file_size": 10098,
-- "play_url": "https://api.zoom.us/recording/play/ABdkEEEfhlgldfjkglfghlkfdklhsg",
-- "download_url": "https://api.zoom.us/recording/download/ABdkEEEfhlgldfjkglfghlkfdklhsg",
-- "status": "completed",
-- "recording_type": "audio_only"
-- },
-- {
-- "meeting_id": "gkABCDEbbbbbbbkPuA==",
-- "recording_start": "2019-08-29T21:54:55Z",
-- "recording_end": "2019-08-29T21:55:24Z",
-- "file_type": "TIMELINE",
-- "download_url": "https://api.zoom.us/recording/download/e2ed-dlkjgdfkgh-kslsdbsjf1a"
-- }
-- ],
-- "download_access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJtaWQiOiJvNEU2WnVydFJQdWpxQVZQNmxoTVpnPT0iLCJleHAiOjE2MjEzMDY3MTR9.AiTsTgso8-g487NROU7oGXsn04W68HdZXrjqR3W-X_s",
-- "password": "123456789",
-- "participant_audio_files": [
-- {
-- "id": "6ebb42fb-fce2-4c6d-932d-27229f07e933",
-- "recording_start": "2021-06-22T05:23:41Z",
-- "recording_end": "2021-06-22T05:23:58Z",
-- "file_name": "Audio only - API1 TA2",
-- "file_type": "M4A",
-- "file_extension": "M4A",
-- "file_size": 272173,
-- "play_url": "https://example.zoomdev.us/rec/play/S9sHV863qengfT4zNYGSE2gUpltTVQOL2cwOjFkyGfVZhOpnONozI_9RVJsfcc-y3iT0ayG7CKrXnGw.yqI3hidFZBHn3LXt",
-- "download_url": "https://example.zoomdev.us/rec/download/S9sHV863qengfT4zNYGSE2gUpltTVQOL2cwOjFkyGfVZhOpnONozI_9RVJsfcc-y3iT0ayG7CKrXnGw.yqI3hidFZBHn3LXt",
-- "status": "completed"
-- }
-- ]
-- }
-- Sample code for parsing the JSON response...
-- Use this online tool to generate parsing code from sample JSON: Generate JSON Parsing Code
DECLARE @id_str nvarchar(4000)
DECLARE @meeting_id nvarchar(4000)
DECLARE @recording_start nvarchar(4000)
DECLARE @recording_end nvarchar(4000)
DECLARE @file_type nvarchar(4000)
DECLARE @file_size int
DECLARE @play_url nvarchar(4000)
DECLARE @download_url nvarchar(4000)
DECLARE @status nvarchar(4000)
DECLARE @recording_type nvarchar(4000)
DECLARE @file_name nvarchar(4000)
DECLARE @file_extension nvarchar(4000)
DECLARE @uuid nvarchar(4000)
EXEC sp_OAMethod @jResp, 'StringOf', @uuid OUT, 'uuid'
DECLARE @id int
EXEC sp_OAMethod @jResp, 'IntOf', @id OUT, 'id'
DECLARE @account_id nvarchar(4000)
EXEC sp_OAMethod @jResp, 'StringOf', @account_id OUT, 'account_id'
DECLARE @host_id nvarchar(4000)
EXEC sp_OAMethod @jResp, 'StringOf', @host_id OUT, 'host_id'
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 @start_time nvarchar(4000)
EXEC sp_OAMethod @jResp, 'StringOf', @start_time OUT, 'start_time'
DECLARE @timezone nvarchar(4000)
EXEC sp_OAMethod @jResp, 'StringOf', @timezone OUT, 'timezone'
DECLARE @duration int
EXEC sp_OAMethod @jResp, 'IntOf', @duration OUT, 'duration'
DECLARE @total_size int
EXEC sp_OAMethod @jResp, 'IntOf', @total_size OUT, 'total_size'
DECLARE @recording_count int
EXEC sp_OAMethod @jResp, 'IntOf', @recording_count OUT, 'recording_count'
DECLARE @share_url nvarchar(4000)
EXEC sp_OAMethod @jResp, 'StringOf', @share_url OUT, 'share_url'
DECLARE @download_access_token nvarchar(4000)
EXEC sp_OAMethod @jResp, 'StringOf', @download_access_token OUT, 'download_access_token'
DECLARE @password nvarchar(4000)
EXEC sp_OAMethod @jResp, 'StringOf', @password OUT, 'password'
DECLARE @i int
SELECT @i = 0
DECLARE @count_i int
EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_i OUT, 'recording_files'
WHILE @i < @count_i
BEGIN
EXEC sp_OASetProperty @jResp, 'I', @i
EXEC sp_OAMethod @jResp, 'StringOf', @id_str OUT, 'recording_files[i].id'
EXEC sp_OAMethod @jResp, 'StringOf', @meeting_id OUT, 'recording_files[i].meeting_id'
EXEC sp_OAMethod @jResp, 'StringOf', @recording_start OUT, 'recording_files[i].recording_start'
EXEC sp_OAMethod @jResp, 'StringOf', @recording_end OUT, 'recording_files[i].recording_end'
EXEC sp_OAMethod @jResp, 'StringOf', @file_type OUT, 'recording_files[i].file_type'
EXEC sp_OAMethod @jResp, 'IntOf', @file_size OUT, 'recording_files[i].file_size'
EXEC sp_OAMethod @jResp, 'StringOf', @play_url OUT, 'recording_files[i].play_url'
EXEC sp_OAMethod @jResp, 'StringOf', @download_url OUT, 'recording_files[i].download_url'
EXEC sp_OAMethod @jResp, 'StringOf', @status OUT, 'recording_files[i].status'
EXEC sp_OAMethod @jResp, 'StringOf', @recording_type OUT, 'recording_files[i].recording_type'
SELECT @i = @i + 1
END
SELECT @i = 0
EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_i OUT, 'participant_audio_files'
WHILE @i < @count_i
BEGIN
EXEC sp_OASetProperty @jResp, 'I', @i
EXEC sp_OAMethod @jResp, 'StringOf', @id_str OUT, 'participant_audio_files[i].id'
EXEC sp_OAMethod @jResp, 'StringOf', @recording_start OUT, 'participant_audio_files[i].recording_start'
EXEC sp_OAMethod @jResp, 'StringOf', @recording_end OUT, 'participant_audio_files[i].recording_end'
EXEC sp_OAMethod @jResp, 'StringOf', @file_name OUT, 'participant_audio_files[i].file_name'
EXEC sp_OAMethod @jResp, 'StringOf', @file_type OUT, 'participant_audio_files[i].file_type'
EXEC sp_OAMethod @jResp, 'StringOf', @file_extension OUT, 'participant_audio_files[i].file_extension'
EXEC sp_OAMethod @jResp, 'IntOf', @file_size OUT, 'participant_audio_files[i].file_size'
EXEC sp_OAMethod @jResp, 'StringOf', @play_url OUT, 'participant_audio_files[i].play_url'
EXEC sp_OAMethod @jResp, 'StringOf', @download_url OUT, 'participant_audio_files[i].download_url'
EXEC sp_OAMethod @jResp, 'StringOf', @status OUT, 'participant_audio_files[i].status'
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 "include_fields=quis%20officia%20in%20reprehenderit"
-d "ttl=20600"
-H "Authorization: Bearer <access_token>"
https://api.zoom.us/v2/meetings/:meetingId/recordings
Postman Collection Item JSON
{
"name": "Get meeting recordings",
"request": {
"auth": {
"type": "oauth2"
},
"method": "GET",
"header": [
],
"url": {
"raw": "{{baseUrl}}/meetings/:meetingId/recordings?include_fields=quis officia in reprehenderit&ttl=20600",
"host": [
"{{baseUrl}}"
],
"path": [
"meetings",
":meetingId",
"recordings"
],
"query": [
{
"key": "include_fields",
"value": "quis officia in reprehenderit",
"description": "Get the `download_access_token` field for downloading meeting recordings."
},
{
"key": "ttl",
"value": "20600",
"description": "Time to live (TTL) of the `download_access_token`. This is only valid if the `include_fields` query parameter contains `download_access_token`. The range is between 0-604800."
}
],
"variable": [
{
"key": "meetingId",
"value": "quis officia in reprehenderit",
"description": "(Required) To get Cloud Recordings of a meeting, provide the meeting ID or meeting UUID. If the meeting ID is provided instead of UUID,the response will be for the latest meeting instance. \n\nTo get Cloud Recordings of a webinar, provide the webinar ID or the webinar UUID. If the webinar ID is provided instead of UUID,the response will be for the latest webinar instance. \n\nIf a UUID starts with \"/\" or contains \"//\" (example: \"/ajXp112QmuoKj4854875==\"), you must **double encode** the UUID before making an API request. "
}
]
},
"description": "Get all the [recordings](https://support.zoom.us/hc/en-us/articles/203741855-Cloud-Recording#h_7420acb5-1897-4061-87b4-5b76e99c03b4) from a meeting or Webinar instance. The recording files can be downloaded via the `download_url` property listed in the response.\n\n> To access a password-protected cloud recording, add an `access_token` parameter to the download URL and provide OAuth access token or [JWT](https://marketplace.zoom.us/docs/guides/getting-started/app-types/create-jwt-app) as the `access_token` value.\n\n**Scopes:** `recording:read:admin`, `recording:read`</br>**[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Light`"
},
"response": [
{
"name": "**Error Code:** `200` <br>\nYou do not have the right permissions.\n**HTTP Status Code:** `200`<br>\nRecording object returned.<br>\n",
"originalRequest": {
"method": "GET",
"header": [
{
"description": "Added as a part of security scheme: oauth2",
"key": "Authorization",
"value": "<token>"
}
],
"url": {
"raw": "{{baseUrl}}/meetings/:meetingId/recordings?include_fields=quis officia in reprehenderit&ttl=20600",
"host": [
"{{baseUrl}}"
],
"path": [
"meetings",
":meetingId",
"recordings"
],
"query": [
{
"key": "include_fields",
"value": "quis officia in reprehenderit"
},
{
"key": "ttl",
"value": "20600"
}
],
"variable": [
{
"key": "meetingId",
"value": "quis officia in reprehenderit",
"description": "(Required) To get Cloud Recordings of a meeting, provide the meeting ID or meeting UUID. If the meeting ID is provided instead of UUID,the response will be for the latest meeting instance. \n\nTo get Cloud Recordings of a webinar, provide the webinar ID or the webinar UUID. If the webinar ID is provided instead of UUID,the response will be for the latest webinar instance. \n\nIf a UUID starts with \"/\" or contains \"//\" (example: \"/ajXp112QmuoKj4854875==\"), you must **double encode** the UUID before making an API request. "
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"cookie": [
],
"body": "{\n \"uuid\": \"gkABCDEbbbbbbbkPuA==\",\n \"id\": 68000000031879,\n \"account_id\": \"EABkdslfBBBdk\",\n \"host_id\": \"z8yBXksaAAjdhfsfdfkjgg\",\n \"topic\": \"MyTestPollMeeting\",\n \"type\": 2,\n \"start_time\": \"2019-08-29T21:54:49Z\",\n \"timezone\": \"America/Los_Angeles\",\n \"duration\": 1,\n \"total_size\": 74596,\n \"recording_count\": 4,\n \"share_url\": \"https://api.zoom.us/recording/share/abcdkhfdbbfdjbg\",\n \"recording_files\": [\n {\n \"id\": \"96119skjlfhdshkjf-djkfndjf0-f791\",\n \"meeting_id\": \"gkABCDEbbbbbbbkPuA==\",\n \"recording_start\": \"2019-08-29T21:54:55Z\",\n \"recording_end\": \"2019-08-29T21:55:24Z\",\n \"file_type\": \"MP4\",\n \"file_size\": 37285,\n \"play_url\": \"https://api.zoom.us/recording/play/Qg75t7xZBtEbAkjdlgbfdngBBBB\",\n \"download_url\": \"https://api.zoom.us/recording/download/Qg75t7xZBtEbAkjdlgbfdngBBBB\",\n \"status\": \"completed\",\n \"recording_type\": \"shared_screen_with_speaker_view\"\n },\n {\n \"id\": \"5890sfjkdsf-aaaakdf-fbbb618718e\",\n \"meeting_id\": \"gkABCDEbbbbbbbkPuA==\",\n \"recording_start\": \"2019-08-29T21:54:55Z\",\n \"recording_end\": \"2019-08-29T21:55:24Z\",\n \"file_type\": \"M4A\",\n \"file_size\": 10098,\n \"play_url\": \"https://api.zoom.us/recording/play/ABdkEEEfhlgldfjkglfghlkfdklhsg\",\n \"download_url\": \"https://api.zoom.us/recording/download/ABdkEEEfhlgldfjkglfghlkfdklhsg\",\n \"status\": \"completed\",\n \"recording_type\": \"audio_only\"\n },\n {\n \"meeting_id\": \"gkABCDEbbbbbbbkPuA==\",\n \"recording_start\": \"2019-08-29T21:54:55Z\",\n \"recording_end\": \"2019-08-29T21:55:24Z\",\n \"file_type\": \"TIMELINE\",\n \"download_url\": \"https://api.zoom.us/recording/download/e2ed-dlkjgdfkgh-kslsdbsjf1a\"\n }\n ],\n \"download_access_token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJtaWQiOiJvNEU2WnVydFJQdWpxQVZQNmxoTVpnPT0iLCJleHAiOjE2MjEzMDY3MTR9.AiTsTgso8-g487NROU7oGXsn04W68HdZXrjqR3W-X_s\",\n \"password\": \"123456789\",\n \"participant_audio_files\": [\n {\n \"id\": \"6ebb42fb-fce2-4c6d-932d-27229f07e933\",\n \"recording_start\": \"2021-06-22T05:23:41Z\",\n \"recording_end\": \"2021-06-22T05:23:58Z\",\n \"file_name\": \"Audio only - API1 TA2\",\n \"file_type\": \"M4A\",\n \"file_extension\": \"M4A\",\n \"file_size\": 272173,\n \"play_url\": \"https://example.zoomdev.us/rec/play/S9sHV863qengfT4zNYGSE2gUpltTVQOL2cwOjFkyGfVZhOpnONozI_9RVJsfcc-y3iT0ayG7CKrXnGw.yqI3hidFZBHn3LXt\",\n \"download_url\": \"https://example.zoomdev.us/rec/download/S9sHV863qengfT4zNYGSE2gUpltTVQOL2cwOjFkyGfVZhOpnONozI_9RVJsfcc-y3iT0ayG7CKrXnGw.yqI3hidFZBHn3LXt\",\n \"status\": \"completed\"\n }\n ]\n}"
},
{
"name": "**HTTP Status Code:** `400` <br>\n**Error Code:** `1010`<br>\nUser not found on this account: {accountId}.",
"originalRequest": {
"method": "GET",
"header": [
{
"description": "Added as a part of security scheme: oauth2",
"key": "Authorization",
"value": "<token>"
}
],
"url": {
"raw": "{{baseUrl}}/meetings/:meetingId/recordings?include_fields=quis officia in reprehenderit&ttl=20600",
"host": [
"{{baseUrl}}"
],
"path": [
"meetings",
":meetingId",
"recordings"
],
"query": [
{
"key": "include_fields",
"value": "quis officia in reprehenderit"
},
{
"key": "ttl",
"value": "20600"
}
],
"variable": [
{
"key": "meetingId",
"value": "quis officia in reprehenderit",
"description": "(Required) To get Cloud Recordings of a meeting, provide the meeting ID or meeting UUID. If the meeting ID is provided instead of UUID,the response will be for the latest meeting instance. \n\nTo get Cloud Recordings of a webinar, provide the webinar ID or the webinar UUID. If the webinar ID is provided instead of UUID,the response will be for the latest webinar instance. \n\nIf a UUID starts with \"/\" or contains \"//\" (example: \"/ajXp112QmuoKj4854875==\"), you must **double encode** the 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 recording not found.<br>\n**Error Code:** `1001`<br>\nUser {userId} does not exist or does not belong to this account.<br>\n**Error Code:** `3301`<br>\nThere is no recording for this meeting.",
"originalRequest": {
"method": "GET",
"header": [
{
"description": "Added as a part of security scheme: oauth2",
"key": "Authorization",
"value": "<token>"
}
],
"url": {
"raw": "{{baseUrl}}/meetings/:meetingId/recordings?include_fields=quis officia in reprehenderit&ttl=20600",
"host": [
"{{baseUrl}}"
],
"path": [
"meetings",
":meetingId",
"recordings"
],
"query": [
{
"key": "include_fields",
"value": "quis officia in reprehenderit"
},
{
"key": "ttl",
"value": "20600"
}
],
"variable": [
{
"key": "meetingId",
"value": "quis officia in reprehenderit",
"description": "(Required) To get Cloud Recordings of a meeting, provide the meeting ID or meeting UUID. If the meeting ID is provided instead of UUID,the response will be for the latest meeting instance. \n\nTo get Cloud Recordings of a webinar, provide the webinar ID or the webinar UUID. If the webinar ID is provided instead of UUID,the response will be for the latest webinar instance. \n\nIf a UUID starts with \"/\" or contains \"//\" (example: \"/ajXp112QmuoKj4854875==\"), you must **double encode** the UUID before making an API request. "
}
]
}
},
"status": "Not Found",
"code": 404,
"_postman_previewlanguage": "text",
"header": [
{
"key": "Content-Type",
"value": "text/plain"
}
],
"cookie": [
],
"body": ""
}
]
}