Objective-C / Zoom API / Update a Zoom Room profile
Back to Collection Items
#import <CkoHttp.h>
#import <CkoHttpRequest.h>
#import <CkoJsonObject.h>
#import <CkoHttpResponse.h>
#import <CkoStringBuilder.h>
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
CkoHttp *http = [[CkoHttp alloc] init];
BOOL success;
CkoHttpRequest *req = [[CkoHttpRequest alloc] init];
req.HttpVerb = @"PATCH";
req.Path = @"/v2/rooms/:roomId";
req.ContentType = @"multipart/form-data";
CkoJsonObject *jsonFormData1 = [[CkoJsonObject alloc] init];
[jsonFormData1 UpdateString: @"name" value: @"ut in"];
[jsonFormData1 UpdateString: @"support_email" value: @"YAkxZOWRHE@LIxSJPEjJjSLERZGg.gv"];
[jsonFormData1 UpdateString: @"support_phone" value: @"minim ut sunt"];
[jsonFormData1 UpdateString: @"room_passcode" value: @"cons"];
[jsonFormData1 UpdateBool: @"required_code_to_ext" value: NO];
[jsonFormData1 UpdateBool: @"hide_room_in_contacts" value: NO];
[req AddStringForUpload2: @"basic" filename: @"" strData: jsonFormData1 charset: @"utf-8" contentType: @"application/json"];
[req AddHeader: @"Authorization" value: @"Bearer <access_token>"];
CkoHttpResponse *resp = [http SynchronousRequest: @"api.zoom.us" port: [NSNumber numberWithInt: 443] ssl: YES req: req];
if (http.LastMethodSuccess == NO) {
NSLog(@"%@",http.LastErrorText);
return;
}
CkoStringBuilder *sbResponseBody = [[CkoStringBuilder alloc] init];
[resp GetBodySb: sbResponseBody];
CkoJsonObject *jResp = [[CkoJsonObject alloc] init];
[jResp LoadSb: sbResponseBody];
jResp.EmitCompact = NO;
NSLog(@"%@",@"Response Body:");
NSLog(@"%@",[jResp Emit]);
int respStatusCode = [resp.StatusCode intValue];
NSLog(@"%@%d",@"Response Status Code = ",respStatusCode);
if (respStatusCode >= 400) {
NSLog(@"%@",@"Response Header:");
NSLog(@"%@",resp.Header);
NSLog(@"%@",@"Failed.");
return;
}
Curl Command
curl -X PATCH
-H "Authorization: Bearer <access_token>"
-H "Content-Type: multipart/form-data"
--form 'basic={"name":"ut in","support_email":"YAkxZOWRHE@LIxSJPEjJjSLERZGg.gv","support_phone":"minim ut sunt","room_passcode":"cons","required_code_to_ext":false,"hide_room_in_contacts":false}'
https://api.zoom.us/v2/rooms/:roomId
Postman Collection Item JSON
{
"name": "Update a Zoom Room profile",
"request": {
"auth": {
"type": "oauth2"
},
"method": "PATCH",
"header": [
{
"key": "Content-Type",
"value": "multipart/form-data"
}
],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "basic",
"value": "{\"name\":\"ut in\",\"support_email\":\"YAkxZOWRHE@LIxSJPEjJjSLERZGg.gv\",\"support_phone\":\"minim ut sunt\",\"room_passcode\":\"cons\",\"required_code_to_ext\":false,\"hide_room_in_contacts\":false}",
"type": "text"
}
]
},
"url": {
"raw": "{{baseUrl}}/rooms/:roomId",
"host": [
"{{baseUrl}}"
],
"path": [
"rooms",
":roomId"
],
"variable": [
{
"key": "roomId",
"value": "quis officia in reprehenderit",
"description": "(Required) Unique Identifier of a Zoom Room."
}
]
},
"description": "Update basic information on a specific Zoom Room in a Zoom account.<br>\n\n**Prerequisites:**<br>\n* Pro or a higher plan with [Zoom Room](https://zoom.us/zoomrooms) license.<br>\n**Scopes**: `room:write:admin`<br> \n **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Medium`"
},
"response": [
{
"name": "**HTTP Status Code:** `204` **No Content**<br>\nRoom Profile information updated successfully.\n",
"originalRequest": {
"method": "PATCH",
"header": [
{
"description": "Added as a part of security scheme: oauth2",
"key": "Authorization",
"value": "<token>"
}
],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "basic",
"value": "{\"name\":\"ut in\",\"support_email\":\"YAkxZOWRHE@LIxSJPEjJjSLERZGg.gv\",\"support_phone\":\"minim ut sunt\",\"room_passcode\":\"cons\",\"required_code_to_ext\":false,\"hide_room_in_contacts\":false}",
"type": "text"
}
]
},
"url": {
"raw": "{{baseUrl}}/rooms/:roomId",
"host": [
"{{baseUrl}}"
],
"path": [
"rooms",
":roomId"
],
"variable": [
{
"key": "roomId",
"value": "quis officia in reprehenderit",
"description": "(Required) Unique Identifier of a Zoom Room."
}
]
}
},
"status": "No Content",
"code": 204,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"cookie": [
],
"body": "{}"
},
{
"name": "**HTTP Status Code:** `400` **Bad Request**<br><br>\n**Error Code:** `200`<br>\nZoom Room subscription not found. Try again after purchasing a Zoom Room subscription.<br>\nAccess restricted.<br><br>\n\n",
"originalRequest": {
"method": "PATCH",
"header": [
{
"description": "Added as a part of security scheme: oauth2",
"key": "Authorization",
"value": "<token>"
}
],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "basic",
"value": "{\"name\":\"ut in\",\"support_email\":\"YAkxZOWRHE@LIxSJPEjJjSLERZGg.gv\",\"support_phone\":\"minim ut sunt\",\"room_passcode\":\"cons\",\"required_code_to_ext\":false,\"hide_room_in_contacts\":false}",
"type": "text"
}
]
},
"url": {
"raw": "{{baseUrl}}/rooms/:roomId",
"host": [
"{{baseUrl}}"
],
"path": [
"rooms",
":roomId"
],
"variable": [
{
"key": "roomId",
"value": "quis officia in reprehenderit",
"description": "(Required) Unique Identifier of a Zoom Room."
}
]
}
},
"status": "Bad Request",
"code": 400,
"_postman_previewlanguage": "text",
"header": [
{
"key": "Content-Type",
"value": "text/plain"
}
],
"cookie": [
],
"body": ""
},
{
"name": "**HTTP Status Code:** `404` **Not Found**<br><br>\n**Error Code:** `1012`<br>\nRoom not found:{roomId}\n",
"originalRequest": {
"method": "PATCH",
"header": [
{
"description": "Added as a part of security scheme: oauth2",
"key": "Authorization",
"value": "<token>"
}
],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "basic",
"value": "{\"name\":\"ut in\",\"support_email\":\"YAkxZOWRHE@LIxSJPEjJjSLERZGg.gv\",\"support_phone\":\"minim ut sunt\",\"room_passcode\":\"cons\",\"required_code_to_ext\":false,\"hide_room_in_contacts\":false}",
"type": "text"
}
]
},
"url": {
"raw": "{{baseUrl}}/rooms/:roomId",
"host": [
"{{baseUrl}}"
],
"path": [
"rooms",
":roomId"
],
"variable": [
{
"key": "roomId",
"value": "quis officia in reprehenderit",
"description": "(Required) Unique Identifier of a Zoom Room."
}
]
}
},
"status": "Not Found",
"code": 404,
"_postman_previewlanguage": "text",
"header": [
{
"key": "Content-Type",
"value": "text/plain"
}
],
"cookie": [
],
"body": ""
}
]
}