SQL Server / Zoom API / Create a recording registrant
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 @req int
-- Use "Chilkat_9_5_0.HttpRequest" for versions of Chilkat < 10.0.0
EXEC @hr = sp_OACreate 'Chilkat.HttpRequest', @req OUT
EXEC sp_OASetProperty @req, 'HttpVerb', 'POST'
EXEC sp_OASetProperty @req, 'Path', '/v2/meetings/:meetingId/recordings/registrants'
EXEC sp_OASetProperty @req, 'ContentType', 'multipart/form-data'
EXEC sp_OAMethod @req, 'AddParam', NULL, 'email', 'ytjjUxrx24f2i@IEOZkDxSnqnLEbZ.pkpb'
EXEC sp_OAMethod @req, 'AddParam', NULL, 'first_name', 'ytjjUxrx24f2i@IEOZkDxSnqnLEbZ.pkpbin Lorem nostrud'
EXEC sp_OAMethod @req, 'AddParam', NULL, 'status', 'ytjjUxrx24f2i@IEOZkDxSnqnLEbZ.pkpbin Lorem nostruddenied'
EXEC sp_OAMethod @req, 'AddParam', NULL, 'last_name', 'ytjjUxrx24f2i@IEOZkDxSnqnLEbZ.pkpbin Lorem nostruddenieddeserunt veniam'
EXEC sp_OAMethod @req, 'AddParam', NULL, 'address', 'ytjjUxrx24f2i@IEOZkDxSnqnLEbZ.pkpbin Lorem nostruddenieddeserunt veniamcupidatat tempor min'
EXEC sp_OAMethod @req, 'AddParam', NULL, 'city', 'ytjjUxrx24f2i@IEOZkDxSnqnLEbZ.pkpbin Lorem nostruddenieddeserunt veniamcupidatat tempor minut deserunt labore'
EXEC sp_OAMethod @req, 'AddParam', NULL, 'country', 'ytjjUxrx24f2i@IEOZkDxSnqnLEbZ.pkpbin Lorem nostruddenieddeserunt veniamcupidatat tempor minut deserunt laboremollit incididunt'
EXEC sp_OAMethod @req, 'AddParam', NULL, 'zip', 'ytjjUxrx24f2i@IEOZkDxSnqnLEbZ.pkpbin Lorem nostruddenieddeserunt veniamcupidatat tempor minut deserunt laboremollit incididuntexercitation Duis elit do'
EXEC sp_OAMethod @req, 'AddParam', NULL, 'state', 'ytjjUxrx24f2i@IEOZkDxSnqnLEbZ.pkpbin Lorem nostruddenieddeserunt veniamcupidatat tempor minut deserunt laboremollit incididuntexercitation Duis elit dosint reprehenderit'
EXEC sp_OAMethod @req, 'AddParam', NULL, 'phone', 'ytjjUxrx24f2i@IEOZkDxSnqnLEbZ.pkpbin Lorem nostruddenieddeserunt veniamcupidatat tempor minut deserunt laboremollit incididuntexercitation Duis elit dosint reprehenderitdeserunt ut pariatur consequat'
EXEC sp_OAMethod @req, 'AddParam', NULL, 'industry', 'ytjjUxrx24f2i@IEOZkDxSnqnLEbZ.pkpbin Lorem nostruddenieddeserunt veniamcupidatat tempor minut deserunt laboremollit incididuntexercitation Duis elit dosint reprehenderitdeserunt ut pariatur consequatea in'
EXEC sp_OAMethod @req, 'AddParam', NULL, 'org', 'ytjjUxrx24f2i@IEOZkDxSnqnLEbZ.pkpbin Lorem nostruddenieddeserunt veniamcupidatat tempor minut deserunt laboremollit incididuntexercitation Duis elit dosint reprehenderitdeserunt ut pariatur consequatea intempor'
EXEC sp_OAMethod @req, 'AddParam', NULL, 'job_title', 'ytjjUxrx24f2i@IEOZkDxSnqnLEbZ.pkpbin Lorem nostruddenieddeserunt veniamcupidatat tempor minut deserunt laboremollit incididuntexercitation Duis elit dosint reprehenderitdeserunt ut pariatur consequatea intempordolore id mollit'
EXEC sp_OAMethod @req, 'AddParam', NULL, 'purchasing_time_frame', 'ytjjUxrx24f2i@IEOZkDxSnqnLEbZ.pkpbin Lorem nostruddenieddeserunt veniamcupidatat tempor minut deserunt laboremollit incididuntexercitation Duis elit dosint reprehenderitdeserunt ut pariatur consequatea intempordolore id mollitWithin a month'
EXEC sp_OAMethod @req, 'AddParam', NULL, 'role_in_purchase_process', 'ytjjUxrx24f2i@IEOZkDxSnqnLEbZ.pkpbin Lorem nostruddenieddeserunt veniamcupidatat tempor minut deserunt laboremollit incididuntexercitation Duis elit dosint reprehenderitdeserunt ut pariatur consequatea intempordolore id mollitWithin a month'
EXEC sp_OAMethod @req, 'AddParam', NULL, 'no_of_employees', 'ytjjUxrx24f2i@IEOZkDxSnqnLEbZ.pkpbin Lorem nostruddenieddeserunt veniamcupidatat tempor minut deserunt laboremollit incididuntexercitation Duis elit dosint reprehenderitdeserunt ut pariatur consequatea intempordolore id mollitWithin a month5,001-10,000'
EXEC sp_OAMethod @req, 'AddParam', NULL, 'comments', 'ytjjUxrx24f2i@IEOZkDxSnqnLEbZ.pkpbin Lorem nostruddenieddeserunt veniamcupidatat tempor minut deserunt laboremollit incididuntexercitation Duis elit dosint reprehenderitdeserunt ut pariatur consequatea intempordolore id mollitWithin a month5,001-10,000est veniam nostrud ut'
EXEC sp_OAMethod @req, 'AddParam', NULL, 'custom_questions', 'ytjjUxrx24f2i@IEOZkDxSnqnLEbZ.pkpbin Lorem nostruddenieddeserunt veniamcupidatat tempor minut deserunt laboremollit incididuntexercitation Duis elit dosint reprehenderitdeserunt ut pariatur consequatea intempordolore id mollitWithin a month5,001-10,000est veniam nostrud ut[{"title":"Ut ut","value":"dolore mollit"},{"title":"do officia ex pariatur","value":"proident"}]'
EXEC sp_OAMethod @req, 'AddHeader', NULL, 'Authorization', 'Bearer <access_token>'
DECLARE @resp int
EXEC sp_OAMethod @http, 'SynchronousRequest', @resp OUT, 'api.zoom.us', 443, 1, @req
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 @req
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 @req
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)
-- {
-- "registrant_id": "veniamKIW1Sonseq",
-- "id": 12345666,
-- "topic": "cupidatat dolore quis minim aliquip",
-- "share_url": "https://zoom.us/recording/share/IpAAABBBBBBA1aqqkzFFgiJ2jpR"
-- }
-- Sample code for parsing the JSON response...
-- Use this online tool to generate parsing code from sample JSON: Generate JSON Parsing Code
DECLARE @registrant_id nvarchar(4000)
EXEC sp_OAMethod @jResp, 'StringOf', @registrant_id OUT, 'registrant_id'
DECLARE @id int
EXEC sp_OAMethod @jResp, 'IntOf', @id OUT, 'id'
DECLARE @topic nvarchar(4000)
EXEC sp_OAMethod @jResp, 'StringOf', @topic OUT, 'topic'
DECLARE @share_url nvarchar(4000)
EXEC sp_OAMethod @jResp, 'StringOf', @share_url OUT, 'share_url'
EXEC @hr = sp_OADestroy @http
EXEC @hr = sp_OADestroy @req
EXEC @hr = sp_OADestroy @sbResponseBody
EXEC @hr = sp_OADestroy @jResp
END
GO
Curl Command
curl -X POST
-H "Authorization: Bearer <access_token>"
-H "Content-Type: multipart/form-data"
--form 'email=ytjjUxrx24f2i@IEOZkDxSnqnLEbZ.pkpb'
--form 'first_name=ytjjUxrx24f2i@IEOZkDxSnqnLEbZ.pkpbin Lorem nostrud'
--form 'status=ytjjUxrx24f2i@IEOZkDxSnqnLEbZ.pkpbin Lorem nostruddenied'
--form 'last_name=ytjjUxrx24f2i@IEOZkDxSnqnLEbZ.pkpbin Lorem nostruddenieddeserunt veniam'
--form 'address=ytjjUxrx24f2i@IEOZkDxSnqnLEbZ.pkpbin Lorem nostruddenieddeserunt veniamcupidatat tempor min'
--form 'city=ytjjUxrx24f2i@IEOZkDxSnqnLEbZ.pkpbin Lorem nostruddenieddeserunt veniamcupidatat tempor minut deserunt labore'
--form 'country=ytjjUxrx24f2i@IEOZkDxSnqnLEbZ.pkpbin Lorem nostruddenieddeserunt veniamcupidatat tempor minut deserunt laboremollit incididunt'
--form 'zip=ytjjUxrx24f2i@IEOZkDxSnqnLEbZ.pkpbin Lorem nostruddenieddeserunt veniamcupidatat tempor minut deserunt laboremollit incididuntexercitation Duis elit do'
--form 'state=ytjjUxrx24f2i@IEOZkDxSnqnLEbZ.pkpbin Lorem nostruddenieddeserunt veniamcupidatat tempor minut deserunt laboremollit incididuntexercitation Duis elit dosint reprehenderit'
--form 'phone=ytjjUxrx24f2i@IEOZkDxSnqnLEbZ.pkpbin Lorem nostruddenieddeserunt veniamcupidatat tempor minut deserunt laboremollit incididuntexercitation Duis elit dosint reprehenderitdeserunt ut pariatur consequat'
--form 'industry=ytjjUxrx24f2i@IEOZkDxSnqnLEbZ.pkpbin Lorem nostruddenieddeserunt veniamcupidatat tempor minut deserunt laboremollit incididuntexercitation Duis elit dosint reprehenderitdeserunt ut pariatur consequatea in'
--form 'org=ytjjUxrx24f2i@IEOZkDxSnqnLEbZ.pkpbin Lorem nostruddenieddeserunt veniamcupidatat tempor minut deserunt laboremollit incididuntexercitation Duis elit dosint reprehenderitdeserunt ut pariatur consequatea intempor'
--form 'job_title=ytjjUxrx24f2i@IEOZkDxSnqnLEbZ.pkpbin Lorem nostruddenieddeserunt veniamcupidatat tempor minut deserunt laboremollit incididuntexercitation Duis elit dosint reprehenderitdeserunt ut pariatur consequatea intempordolore id mollit'
--form 'purchasing_time_frame=ytjjUxrx24f2i@IEOZkDxSnqnLEbZ.pkpbin Lorem nostruddenieddeserunt veniamcupidatat tempor minut deserunt laboremollit incididuntexercitation Duis elit dosint reprehenderitdeserunt ut pariatur consequatea intempordolore id mollitWithin a month'
--form 'role_in_purchase_process=ytjjUxrx24f2i@IEOZkDxSnqnLEbZ.pkpbin Lorem nostruddenieddeserunt veniamcupidatat tempor minut deserunt laboremollit incididuntexercitation Duis elit dosint reprehenderitdeserunt ut pariatur consequatea intempordolore id mollitWithin a month'
--form 'no_of_employees=ytjjUxrx24f2i@IEOZkDxSnqnLEbZ.pkpbin Lorem nostruddenieddeserunt veniamcupidatat tempor minut deserunt laboremollit incididuntexercitation Duis elit dosint reprehenderitdeserunt ut pariatur consequatea intempordolore id mollitWithin a month5,001-10,000'
--form 'comments=ytjjUxrx24f2i@IEOZkDxSnqnLEbZ.pkpbin Lorem nostruddenieddeserunt veniamcupidatat tempor minut deserunt laboremollit incididuntexercitation Duis elit dosint reprehenderitdeserunt ut pariatur consequatea intempordolore id mollitWithin a month5,001-10,000est veniam nostrud ut'
--form 'custom_questions=ytjjUxrx24f2i@IEOZkDxSnqnLEbZ.pkpbin Lorem nostruddenieddeserunt veniamcupidatat tempor minut deserunt laboremollit incididuntexercitation Duis elit dosint reprehenderitdeserunt ut pariatur consequatea intempordolore id mollitWithin a month5,001-10,000est veniam nostrud ut[{"title":"Ut ut","value":"dolore mollit"},{"title":"do officia ex pariatur","value":"proident"}]'
https://api.zoom.us/v2/meetings/:meetingId/recordings/registrants
Postman Collection Item JSON
{
"name": "Create a recording registrant",
"request": {
"auth": {
"type": "oauth2"
},
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "multipart/form-data"
}
],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "email",
"value": "ytjjUxrx24f2i@IEOZkDxSnqnLEbZ.pkpb",
"type": "text"
},
{
"key": "first_name",
"value": "in Lorem nostrud",
"type": "text"
},
{
"key": "status",
"value": "denied",
"type": "text"
},
{
"key": "last_name",
"value": "deserunt veniam",
"type": "text"
},
{
"key": "address",
"value": "cupidatat tempor min",
"type": "text"
},
{
"key": "city",
"value": "ut deserunt labore",
"type": "text"
},
{
"key": "country",
"value": "mollit incididunt",
"type": "text"
},
{
"key": "zip",
"value": "exercitation Duis elit do",
"type": "text"
},
{
"key": "state",
"value": "sint reprehenderit",
"type": "text"
},
{
"key": "phone",
"value": "deserunt ut pariatur consequat",
"type": "text"
},
{
"key": "industry",
"value": "ea in",
"type": "text"
},
{
"key": "org",
"value": "tempor",
"type": "text"
},
{
"key": "job_title",
"value": "dolore id mollit",
"type": "text"
},
{
"key": "purchasing_time_frame",
"value": "Within a month",
"type": "text"
},
{
"key": "role_in_purchase_process",
"value": "",
"type": "text"
},
{
"key": "no_of_employees",
"value": "5,001-10,000",
"type": "text"
},
{
"key": "comments",
"value": "est veniam nostrud ut",
"type": "text"
},
{
"key": "custom_questions",
"value": "[{\"title\":\"Ut ut\",\"value\":\"dolore mollit\"},{\"title\":\"do officia ex pariatur\",\"value\":\"proident\"}]",
"type": "text"
}
]
},
"url": {
"raw": "{{baseUrl}}/meetings/:meetingId/recordings/registrants",
"host": [
"{{baseUrl}}"
],
"path": [
"meetings",
":meetingId",
"recordings",
"registrants"
],
"variable": [
{
"key": "meetingId",
"value": "68423085",
"description": "(Required) The meeting's ID. \n\n When storing this value in your database, you must store it as a **long** format integer and **not** an integer. Meeting IDs can exceed 10 digits."
}
]
},
"description": "Cloud Recordings of past Zoom Meetings can be made [on-demand](https://support.zoom.us/hc/en-us/articles/360000488283-On-demand-Recordings). Users should be [registered](https://marketplace.zoom.us/docs/api-reference/zoom-api/cloud-recording/meetingrecordingregistrantcreate) to view these recordings.\n\nUse this API to register a user to gain access to **On-demand Cloud Recordings** of a past meeting.<br>\n**Scopes:** `recording:write:admin`, `recording:write`.<br>\n \n **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Light`\n\n"
},
"response": [
{
"name": "**HTTP Status Code:** `201` <br>\nRegistration submitted.",
"originalRequest": {
"method": "POST",
"header": [
{
"description": "Added as a part of security scheme: oauth2",
"key": "Authorization",
"value": "<token>"
}
],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "email",
"value": "3uEtro@SmjrkWvqtnwJtizhCgFKllyfwdy.xuf",
"type": "text"
},
{
"key": "first_name",
"value": "nulla cillum",
"type": "text"
},
{
"key": "status",
"value": "pending",
"type": "text"
},
{
"key": "last_name",
"value": "et minim",
"type": "text"
},
{
"key": "address",
"value": "do esse",
"type": "text"
},
{
"key": "city",
"value": "occaecat eiusmod cillum cupidatat",
"type": "text"
},
{
"key": "country",
"value": "nisi magna reprehenderit dolor cillum",
"type": "text"
},
{
"key": "zip",
"value": "nisi",
"type": "text"
},
{
"key": "state",
"value": "amet ullamco proident Excepteur",
"type": "text"
},
{
"key": "phone",
"value": "sit",
"type": "text"
},
{
"key": "industry",
"value": "sit id Ut",
"type": "text"
},
{
"key": "org",
"value": "nisi",
"type": "text"
},
{
"key": "job_title",
"value": "enim dolor occaecat in",
"type": "text"
},
{
"key": "purchasing_time_frame",
"value": "Within a month",
"type": "text"
},
{
"key": "role_in_purchase_process",
"value": "Evaluator/Recommender",
"type": "text"
},
{
"key": "no_of_employees",
"value": "5,001-10,000",
"type": "text"
},
{
"key": "comments",
"value": "nostrud ",
"type": "text"
},
{
"key": "custom_questions",
"value": "[{\"title\":\"eu in veniam\",\"value\":\"qui laborum\"},{\"title\":\"in qui irure\",\"value\":\"qui nostr\"}]",
"type": "text"
}
]
},
"url": {
"raw": "{{baseUrl}}/meetings/:meetingId/recordings/registrants",
"host": [
"{{baseUrl}}"
],
"path": [
"meetings",
":meetingId",
"recordings",
"registrants"
],
"variable": [
{
"key": "meetingId",
"value": "68423085",
"description": "(Required) The meeting's ID. \n\n When storing this value in your database, you must store it as a **long** format integer and **not** an integer. Meeting IDs can exceed 10 digits."
}
]
}
},
"status": "Created",
"code": 201,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"cookie": [
],
"body": "{\n \"registrant_id\": \"veniamKIW1Sonseq\",\n \"id\": 12345666,\n \"topic\": \"cupidatat dolore quis minim aliquip\",\n \"share_url\": \"https://zoom.us/recording/share/IpAAABBBBBBA1aqqkzFFgiJ2jpR\"\n}"
},
{
"name": "**HTTP Status Code:** `404` <br>\nMeeting recording not found",
"originalRequest": {
"method": "POST",
"header": [
{
"description": "Added as a part of security scheme: oauth2",
"key": "Authorization",
"value": "<token>"
}
],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "email",
"value": "3uEtro@SmjrkWvqtnwJtizhCgFKllyfwdy.xuf",
"type": "text"
},
{
"key": "first_name",
"value": "nulla cillum",
"type": "text"
},
{
"key": "status",
"value": "pending",
"type": "text"
},
{
"key": "last_name",
"value": "et minim",
"type": "text"
},
{
"key": "address",
"value": "do esse",
"type": "text"
},
{
"key": "city",
"value": "occaecat eiusmod cillum cupidatat",
"type": "text"
},
{
"key": "country",
"value": "nisi magna reprehenderit dolor cillum",
"type": "text"
},
{
"key": "zip",
"value": "nisi",
"type": "text"
},
{
"key": "state",
"value": "amet ullamco proident Excepteur",
"type": "text"
},
{
"key": "phone",
"value": "sit",
"type": "text"
},
{
"key": "industry",
"value": "sit id Ut",
"type": "text"
},
{
"key": "org",
"value": "nisi",
"type": "text"
},
{
"key": "job_title",
"value": "enim dolor occaecat in",
"type": "text"
},
{
"key": "purchasing_time_frame",
"value": "Within a month",
"type": "text"
},
{
"key": "role_in_purchase_process",
"value": "Evaluator/Recommender",
"type": "text"
},
{
"key": "no_of_employees",
"value": "5,001-10,000",
"type": "text"
},
{
"key": "comments",
"value": "nostrud ",
"type": "text"
},
{
"key": "custom_questions",
"value": "[{\"title\":\"eu in veniam\",\"value\":\"qui laborum\"},{\"title\":\"in qui irure\",\"value\":\"qui nostr\"}]",
"type": "text"
}
]
},
"url": {
"raw": "{{baseUrl}}/meetings/:meetingId/recordings/registrants",
"host": [
"{{baseUrl}}"
],
"path": [
"meetings",
":meetingId",
"recordings",
"registrants"
],
"variable": [
{
"key": "meetingId",
"value": "68423085",
"description": "(Required) The meeting's ID. \n\n When storing this value in your database, you must store it as a **long** format integer and **not** an integer. Meeting IDs can exceed 10 digits."
}
]
}
},
"status": "Not Found",
"code": 404,
"_postman_previewlanguage": "text",
"header": [
{
"key": "Content-Type",
"value": "text/plain"
}
],
"cookie": [
],
"body": ""
}
]
}