C++ / Zoom API / Update webinar status
Back to Collection Items
#include <CkHttp.h>
#include <CkHttpRequest.h>
#include <CkHttpResponse.h>
void ChilkatSample(void)
{
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
CkHttp http;
bool success;
CkHttpRequest req;
req.put_HttpVerb("PUT");
req.put_Path("/v2/webinars/:webinarId/status");
req.put_ContentType("multipart/form-data");
req.AddParam("action","end");
req.AddHeader("Authorization","Bearer <access_token>");
CkHttpResponse *resp = http.SynchronousRequest("api.zoom.us",443,true,req);
if (http.get_LastMethodSuccess() == false) {
std::cout << http.lastErrorText() << "\r\n";
return;
}
std::cout << resp->get_StatusCode() << "\r\n";
std::cout << resp->bodyStr() << "\r\n";
delete resp;
}
Curl Command
curl -X PUT
-H "Authorization: Bearer <access_token>"
-H "Content-Type: multipart/form-data"
--form 'action=end'
https://api.zoom.us/v2/webinars/:webinarId/status
Postman Collection Item JSON
{
"name": "Update webinar status",
"request": {
"auth": {
"type": "oauth2"
},
"method": "PUT",
"header": [
{
"key": "Content-Type",
"value": "multipart/form-data"
}
],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "action",
"value": "end",
"description": " (This can only be one of end)",
"type": "text"
}
]
},
"url": {
"raw": "{{baseUrl}}/webinars/:webinarId/status",
"host": [
"{{baseUrl}}"
],
"path": [
"webinars",
":webinarId",
"status"
],
"variable": [
{
"key": "webinarId",
"value": "68423085",
"description": "(Required) The webinar's ID."
}
]
},
"description": "Update a webinar's status. Use this API to end an ongoing webinar.<br><br>\n**Scopes:** `webinar:write:admin` `webinar:write`<br>\n \n **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Light`<br>\n**Prerequisites:**<br>\n* The account must hold a valid [Webinar plan](https://zoom.us/webinar)."
},
"response": [
{
"name": "Webinar plan subscription is missing. Enable webinar for this user once the subscription is added:{userId}.",
"originalRequest": {
"method": "PUT",
"header": [
{
"description": "Added as a part of security scheme: oauth2",
"key": "Authorization",
"value": "<token>"
}
],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "action",
"value": "end",
"description": " (This can only be one of end)",
"type": "text"
}
]
},
"url": {
"raw": "{{baseUrl}}/webinars/:webinarId/status",
"host": [
"{{baseUrl}}"
],
"path": [
"webinars",
":webinarId",
"status"
],
"variable": [
{
"key": "webinarId",
"value": "68423085",
"description": "(Required) The webinar's ID."
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "text",
"header": [
{
"key": "Content-Type",
"value": "text/plain"
}
],
"cookie": [
],
"body": ""
},
{
"name": "Webinar's status updated.",
"originalRequest": {
"method": "PUT",
"header": [
{
"description": "Added as a part of security scheme: oauth2",
"key": "Authorization",
"value": "<token>"
}
],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "action",
"value": "end",
"description": " (This can only be one of end)",
"type": "text"
}
]
},
"url": {
"raw": "{{baseUrl}}/webinars/:webinarId/status",
"host": [
"{{baseUrl}}"
],
"path": [
"webinars",
":webinarId",
"status"
],
"variable": [
{
"key": "webinarId",
"value": "68423085",
"description": "(Required) The webinar's ID."
}
]
}
},
"status": "No Content",
"code": 204,
"_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>\n**Error Code:** `3003`<br>\nYou are not the meeting host.<br>\n**Error Code:** `3063`<br>\nCan not end on-premise user's meeting:",
"originalRequest": {
"method": "PUT",
"header": [
{
"description": "Added as a part of security scheme: oauth2",
"key": "Authorization",
"value": "<token>"
}
],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "action",
"value": "end",
"description": " (This can only be one of end)",
"type": "text"
}
]
},
"url": {
"raw": "{{baseUrl}}/webinars/:webinarId/status",
"host": [
"{{baseUrl}}"
],
"path": [
"webinars",
":webinarId",
"status"
],
"variable": [
{
"key": "webinarId",
"value": "68423085",
"description": "(Required) The webinar'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>\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": "PUT",
"header": [
{
"description": "Added as a part of security scheme: oauth2",
"key": "Authorization",
"value": "<token>"
}
],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "action",
"value": "end",
"description": " (This can only be one of end)",
"type": "text"
}
]
},
"url": {
"raw": "{{baseUrl}}/webinars/:webinarId/status",
"host": [
"{{baseUrl}}"
],
"path": [
"webinars",
":webinarId",
"status"
],
"variable": [
{
"key": "webinarId",
"value": "68423085",
"description": "(Required) The webinar's ID."
}
]
}
},
"status": "Not Found",
"code": 404,
"_postman_previewlanguage": "text",
"header": [
{
"key": "Content-Type",
"value": "text/plain"
}
],
"cookie": [
],
"body": ""
}
]
}