Chilkat Online Tools

VB.NET / Zoom API / Update a Zoom Room profile

Back to Collection Items

' This example assumes the Chilkat API to have been previously unlocked.
' See Global Unlock Sample for sample code.

Dim http As New Chilkat.Http
Dim success As Boolean

Dim req As New Chilkat.HttpRequest
req.HttpVerb = "PATCH"
req.Path = "/v2/rooms/:roomId"
req.ContentType = "multipart/form-data"

Dim jsonFormData1 As New Chilkat.JsonObject
jsonFormData1.UpdateString("name","ut in")
jsonFormData1.UpdateString("support_email","YAkxZOWRHE@LIxSJPEjJjSLERZGg.gv")
jsonFormData1.UpdateString("support_phone","minim ut sunt")
jsonFormData1.UpdateString("room_passcode","cons")
jsonFormData1.UpdateBool("required_code_to_ext",False)
jsonFormData1.UpdateBool("hide_room_in_contacts",False)
req.AddStringForUpload2("basic","",jsonFormData1,"utf-8","application/json")

req.AddHeader("Authorization","Bearer <access_token>")

Dim resp As Chilkat.HttpResponse = http.SynchronousRequest("api.zoom.us",443,True,req)
If (http.LastMethodSuccess = False) Then
    Debug.WriteLine(http.LastErrorText)
    Exit Sub
End If


Dim sbResponseBody As New Chilkat.StringBuilder
resp.GetBodySb(sbResponseBody)

Dim jResp As New Chilkat.JsonObject
jResp.LoadSb(sbResponseBody)
jResp.EmitCompact = False

Debug.WriteLine("Response Body:")
Debug.WriteLine(jResp.Emit())

Dim respStatusCode As Integer = resp.StatusCode
Debug.WriteLine("Response Status Code = " & respStatusCode)
If (respStatusCode >= 400) Then
    Debug.WriteLine("Response Header:")
    Debug.WriteLine(resp.Header)
    Debug.WriteLine("Failed.")

    Exit Sub
End If


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": ""
    }
  ]
}