unicodeC / Zoom API / Use in-meeting cloud recording controls
Back to Collection Items
#include <C_CkHttpW.h>
#include <C_CkHttpRequestW.h>
#include <C_CkHttpResponseW.h>
#include <C_CkStringBuilderW.h>
#include <C_CkJsonObjectW.h>
void ChilkatSample(void)
{
HCkHttpW http;
BOOL success;
HCkHttpRequestW req;
HCkHttpResponseW resp;
HCkStringBuilderW sbResponseBody;
HCkJsonObjectW jResp;
int respStatusCode;
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
http = CkHttpW_Create();
req = CkHttpRequestW_Create();
CkHttpRequestW_putHttpVerb(req,L"PATCH");
CkHttpRequestW_putPath(req,L"/v2/live_meetings/:meetingId/events");
CkHttpRequestW_putContentType(req,L"multipart/form-data");
CkHttpRequestW_AddParam(req,L"method",L"irure deserunt labore culpa ea");
CkHttpRequestW_AddParam(req,L"params",L"irure deserunt labore culpa ea{\"contacts\":[{\"id\":\"mollit pariatur quis commodo\",\"email\":\"velit non Duis\"},{\"id\":\"eiusmod nostrud\",\"email\":\"reprehenderit laborum in fugiat\"}]}");
CkHttpRequestW_AddHeader(req,L"Authorization",L"Bearer <access_token>");
resp = CkHttpW_SynchronousRequest(http,L"api.zoom.us",443,TRUE,req);
if (CkHttpW_getLastMethodSuccess(http) == FALSE) {
wprintf(L"%s\n",CkHttpW_lastErrorText(http));
CkHttpW_Dispose(http);
CkHttpRequestW_Dispose(req);
return;
}
sbResponseBody = CkStringBuilderW_Create();
CkHttpResponseW_GetBodySb(resp,sbResponseBody);
jResp = CkJsonObjectW_Create();
CkJsonObjectW_LoadSb(jResp,sbResponseBody);
CkJsonObjectW_putEmitCompact(jResp,FALSE);
wprintf(L"Response Body:\n");
wprintf(L"%s\n",CkJsonObjectW_emit(jResp));
respStatusCode = CkHttpResponseW_getStatusCode(resp);
wprintf(L"Response Status Code = %d\n",respStatusCode);
if (respStatusCode >= 400) {
wprintf(L"Response Header:\n");
wprintf(L"%s\n",CkHttpResponseW_header(resp));
wprintf(L"Failed.\n");
CkHttpResponseW_Dispose(resp);
CkHttpW_Dispose(http);
CkHttpRequestW_Dispose(req);
CkStringBuilderW_Dispose(sbResponseBody);
CkJsonObjectW_Dispose(jResp);
return;
}
CkHttpResponseW_Dispose(resp);
CkHttpW_Dispose(http);
CkHttpRequestW_Dispose(req);
CkStringBuilderW_Dispose(sbResponseBody);
CkJsonObjectW_Dispose(jResp);
}
Curl Command
curl -X PATCH
-H "Authorization: Bearer <access_token>"
-H "Content-Type: multipart/form-data"
--form 'method=irure deserunt labore culpa ea'
--form 'params=irure deserunt labore culpa ea{"contacts":[{"id":"mollit pariatur quis commodo","email":"velit non Duis"},{"id":"eiusmod nostrud","email":"reprehenderit laborum in fugiat"}]}'
https://api.zoom.us/v2/live_meetings/:meetingId/events
Postman Collection Item JSON
{
"name": "Use in-meeting cloud recording controls",
"request": {
"method": "PATCH",
"header": [
{
"key": "Content-Type",
"value": "multipart/form-data"
}
],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "method",
"value": "irure deserunt labore culpa ea",
"description": "The in-meeting recording method to control: \n* `recording.start` — Start the recording. \n* `recording.stop` — Stop the recording. \n* `recording.pause` — Pause the recording. \n* `recording.resume` — Resume a paused recording. \n* `participant.invite` — Invite a participant to the meeting.",
"type": "text"
},
{
"key": "params",
"value": "{\"contacts\":[{\"id\":\"mollit pariatur quis commodo\",\"email\":\"velit non Duis\"},{\"id\":\"eiusmod nostrud\",\"email\":\"reprehenderit laborum in fugiat\"}]}",
"description": "The in-meeting parameters.",
"type": "text"
}
]
},
"url": {
"raw": "{{baseUrl}}/live_meetings/:meetingId/events",
"host": [
"{{baseUrl}}"
],
"path": [
"live_meetings",
":meetingId",
"events"
],
"variable": [
{
"key": "meetingId",
"value": "quis officia in reprehenderit",
"description": "(Required) The live meeting's ID."
}
]
},
"description": "Use this API to control [in-meeting](https://support.zoom.us/hc/en-us/articles/360021921032-In-Meeting-Controls) cloud recording features. In-meeting controls include starting and stopping a recording, pausing and resuming a recording, and inviting participants. \n\n**Note:** This API only works for cloud recordings. It does **not** work for local recordings. \n\n**Scopes:** `meeting:write`, `meeting:write:admin`, `meeting:master` \n\n**Prerequisites:**\n* The meeting **must** be a live meeting. \n* [Cloud recording](https://support.zoom.us/hc/en-us/articles/360060231472-Enabling-cloud-recording) must be enabled on the account. \n* The user calling this API must be the host or an alternative meeting host.\n\n **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Medium`"
},
"response": [
{
"name": "**HTTP Status:** `202` **Accepted**\nRequest processed successfully.",
"originalRequest": {
"method": "PATCH",
"header": [
{
"description": "Added as a part of security scheme: oauth2",
"key": "Authorization",
"value": "<token>"
}
],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "method",
"value": "adipisicing Lorem ipsum",
"description": "The in-meeting recording method to control: \n* `recording.start` — Start the recording. \n* `recording.stop` — Stop the recording. \n* `recording.pause` — Pause the recording. \n* `recording.resume` — Resume a paused recording. \n* `participant.invite` — Invite a participant to the meeting.",
"type": "text"
},
{
"key": "params",
"value": "{\"contacts\":[{\"id\":\"elit et quis\",\"email\":\"Duis esse\"},{\"id\":\"mollit \",\"email\":\"sed\"}]}",
"description": "The in-meeting parameters.",
"type": "text"
}
]
},
"url": {
"raw": "{{baseUrl}}/live_meetings/:meetingId/events",
"host": [
"{{baseUrl}}"
],
"path": [
"live_meetings",
":meetingId",
"events"
],
"variable": [
{
"key": "meetingId",
"value": "quis officia in reprehenderit",
"description": "(Required) The live meeting's ID."
}
]
}
},
"status": "Accepted",
"code": 202,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"cookie": [
],
"body": "{}"
},
{
"name": "**HTTP Status:** `400` **Bad Request** <br><br>\n**Error Code:** `300`<br>\n* Meeting id does not exist.<br>\n* Invalid meeting id.<br>\n* Meeting does not exist.<br>\n* No permission.\n",
"originalRequest": {
"method": "PATCH",
"header": [
{
"description": "Added as a part of security scheme: oauth2",
"key": "Authorization",
"value": "<token>"
}
],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "method",
"value": "adipisicing Lorem ipsum",
"description": "The in-meeting recording method to control: \n* `recording.start` — Start the recording. \n* `recording.stop` — Stop the recording. \n* `recording.pause` — Pause the recording. \n* `recording.resume` — Resume a paused recording. \n* `participant.invite` — Invite a participant to the meeting.",
"type": "text"
},
{
"key": "params",
"value": "{\"contacts\":[{\"id\":\"elit et quis\",\"email\":\"Duis esse\"},{\"id\":\"mollit \",\"email\":\"sed\"}]}",
"description": "The in-meeting parameters.",
"type": "text"
}
]
},
"url": {
"raw": "{{baseUrl}}/live_meetings/:meetingId/events",
"host": [
"{{baseUrl}}"
],
"path": [
"live_meetings",
":meetingId",
"events"
],
"variable": [
{
"key": "meetingId",
"value": "quis officia in reprehenderit",
"description": "(Required) The live meeting's ID."
}
]
}
},
"status": "Bad Request",
"code": 400,
"_postman_previewlanguage": "text",
"header": [
{
"key": "Content-Type",
"value": "text/plain"
}
],
"cookie": [
],
"body": ""
},
{
"name": "**HTTP Status Code:** `404`<br>\n**Error Code:** `3001` <br> Meeting {meetingId} is not found or has expired.",
"originalRequest": {
"method": "PATCH",
"header": [
{
"description": "Added as a part of security scheme: oauth2",
"key": "Authorization",
"value": "<token>"
}
],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "method",
"value": "adipisicing Lorem ipsum",
"description": "The in-meeting recording method to control: \n* `recording.start` — Start the recording. \n* `recording.stop` — Stop the recording. \n* `recording.pause` — Pause the recording. \n* `recording.resume` — Resume a paused recording. \n* `participant.invite` — Invite a participant to the meeting.",
"type": "text"
},
{
"key": "params",
"value": "{\"contacts\":[{\"id\":\"elit et quis\",\"email\":\"Duis esse\"},{\"id\":\"mollit \",\"email\":\"sed\"}]}",
"description": "The in-meeting parameters.",
"type": "text"
}
]
},
"url": {
"raw": "{{baseUrl}}/live_meetings/:meetingId/events",
"host": [
"{{baseUrl}}"
],
"path": [
"live_meetings",
":meetingId",
"events"
],
"variable": [
{
"key": "meetingId",
"value": "quis officia in reprehenderit",
"description": "(Required) The live meeting's ID."
}
]
}
},
"status": "Not Found",
"code": 404,
"_postman_previewlanguage": "text",
"header": [
{
"key": "Content-Type",
"value": "text/plain"
}
],
"cookie": [
],
"body": ""
}
]
}