Chilkat Online Tools

DataFlex / Zoom API / Check-in or check-out of a Zoom Room

Back to Collection Items

Use ChilkatAx-9.5.0-win32.pkg

Procedure Test
    Handle hoHttp
    Boolean iSuccess
    Variant vReq
    Handle hoReq
    Variant vResp
    Handle hoResp
    Variant vSbResponseBody
    Handle hoSbResponseBody
    Handle hoJResp
    Integer iRespStatusCode
    String sTemp1
    Boolean bTemp1

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

    Get Create (RefClass(cComChilkatHttp)) To hoHttp
    If (Not(IsComObjectCreated(hoHttp))) Begin
        Send CreateComObject of hoHttp
    End

    Get Create (RefClass(cComChilkatHttpRequest)) To hoReq
    If (Not(IsComObjectCreated(hoReq))) Begin
        Send CreateComObject of hoReq
    End
    Set ComHttpVerb Of hoReq To "PATCH"
    Set ComPath Of hoReq To "/v2/rooms/:id/events"
    Set ComContentType Of hoReq To "multipart/form-data"
    Send ComAddParam To hoReq "method" "quis consectetur veniam laboris"

    Send ComAddParam To hoReq "params" 'quis consectetur veniam laboris{"event_id":"dolore sit laborum Duis","change_key":"ea adipisicing velit","calendar_id":"ullamco labore dolore mollit","resource_email":"U45sjN@qkwQqRsglYQapYeGbizqBNN.mgc"}'

    Send ComAddHeader To hoReq "Authorization" "Bearer <access_token>"

    Get pvComObject of hoReq to vReq
    Get ComSynchronousRequest Of hoHttp "api.zoom.us" 443 True vReq To vResp
    If (IsComObject(vResp)) Begin
        Get Create (RefClass(cComChilkatHttpResponse)) To hoResp
        Set pvComObject Of hoResp To vResp
    End
    Get ComLastMethodSuccess Of hoHttp To bTemp1
    If (bTemp1 = False) Begin
        Get ComLastErrorText Of hoHttp To sTemp1
        Showln sTemp1
        Procedure_Return
    End

    Get Create (RefClass(cComChilkatStringBuilder)) To hoSbResponseBody
    If (Not(IsComObjectCreated(hoSbResponseBody))) Begin
        Send CreateComObject of hoSbResponseBody
    End
    Get pvComObject of hoSbResponseBody to vSbResponseBody
    Get ComGetBodySb Of hoResp vSbResponseBody To iSuccess

    Get Create (RefClass(cComChilkatJsonObject)) To hoJResp
    If (Not(IsComObjectCreated(hoJResp))) Begin
        Send CreateComObject of hoJResp
    End
    Get pvComObject of hoSbResponseBody to vSbResponseBody
    Get ComLoadSb Of hoJResp vSbResponseBody To iSuccess
    Set ComEmitCompact Of hoJResp To False

    Showln "Response Body:"
    Get ComEmit Of hoJResp To sTemp1
    Showln sTemp1

    Get ComStatusCode Of hoResp To iRespStatusCode
    Showln "Response Status Code = " iRespStatusCode
    If (iRespStatusCode >= 400) Begin
        Showln "Response Header:"
        Get ComHeader Of hoResp To sTemp1
        Showln sTemp1
        Showln "Failed."
        Send Destroy of hoResp
        Procedure_Return
    End

    Send Destroy of hoResp


End_Procedure

Curl Command

curl -X PATCH
	-H "Authorization: Bearer <access_token>"
	-H "Content-Type: multipart/form-data"
	--form 'method=quis consectetur veniam laboris'
	--form 'params=quis consectetur veniam laboris{"event_id":"dolore sit laborum Duis","change_key":"ea adipisicing velit","calendar_id":"ullamco labore dolore mollit","resource_email":"U45sjN@qkwQqRsglYQapYeGbizqBNN.mgc"}'
https://api.zoom.us/v2/rooms/:id/events

Postman Collection Item JSON

{
  "name": "Check-in or check-out of a Zoom Room",
  "request": {
    "method": "PATCH",
    "header": [
      {
        "key": "Content-Type",
        "value": "multipart/form-data"
      }
    ],
    "body": {
      "mode": "formdata",
      "formdata": [
        {
          "key": "method",
          "value": "quis consectetur veniam laboris",
          "description": "The value of this field can be one of the following:<br>\n* zoomroom.check_in\n* zoomroom.check_out",
          "type": "text"
        },
        {
          "key": "params",
          "value": "{\"event_id\":\"dolore sit laborum Duis\",\"change_key\":\"ea adipisicing velit\",\"calendar_id\":\"ullamco labore dolore mollit\",\"resource_email\":\"U45sjN@qkwQqRsglYQapYeGbizqBNN.mgc\"}",
          "type": "text"
        }
      ]
    },
    "url": {
      "raw": "{{baseUrl}}/rooms/:id/events",
      "host": [
        "{{baseUrl}}"
      ],
      "path": [
        "rooms",
        ":id",
        "events"
      ],
      "variable": [
        {
          "key": "id",
          "value": "quis officia in reprehenderit",
          "description": "(Required) Room ID"
        }
      ]
    },
    "description": "The Zoom Rooms check-in feature helps maximize your room utilization. Use this API to either **check in** and confirm that you are utilizing the room reservation or to **check out** of the room so that the room gets released from the scheduled meeting and will be made available for others to use. Learn more from the [Using the Zoom Rooms check-in feature](https://support.zoom.us/hc/en-us/articles/360001147163-Using-the-Zoom-Rooms-check-in-feature) guide. \n\n**Prerequisites:**\n* [Zoom Rooms](https://support.zoom.us/hc/en-us/articles/207483343-Getting-started-with-Zoom-Rooms#:~:text=Zoom%20Rooms%20is%20a%20software,or%20from%20their%20mobile%20device) must have been set up for use for the account and must be online. \n* You must have access to the Calendar Integration APIs (either Microsoft Exchange or Google Calendar APIs) to get calendar information associated with the Room.\n\n**Scope:** `room:write:admin`"
  },
  "response": [
    {
      "name": "**HTTP Status Code:** `202` **Accepted**<br>\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": "quis consectetur veniam laboris",
              "description": "The value of this field can be one of the following:<br>\n* zoomroom.check_in\n* zoomroom.check_out",
              "type": "text"
            },
            {
              "key": "params",
              "value": "{\"event_id\":\"dolore sit laborum Duis\",\"change_key\":\"ea adipisicing velit\",\"calendar_id\":\"ullamco labore dolore mollit\",\"resource_email\":\"U45sjN@qkwQqRsglYQapYeGbizqBNN.mgc\"}",
              "type": "text"
            }
          ]
        },
        "url": {
          "raw": "{{baseUrl}}/rooms/:id/events",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "rooms",
            ":id",
            "events"
          ],
          "variable": [
            {
              "key": "id",
              "value": "quis officia in reprehenderit",
              "description": "(Required) Room ID"
            }
          ]
        }
      },
      "status": "Accepted",
      "code": 202,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "{}"
    },
    {
      "name": "**HTTP Status Code:** `400` **Bad Request**<br>\n**Error Code:** `300`<br>\n* Zoom Room is offline. Please ensure that the Zoom Room is online before checking in or checking out.\n* Invalid parameters.\n\n\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": "quis consectetur veniam laboris",
              "description": "The value of this field can be one of the following:<br>\n* zoomroom.check_in\n* zoomroom.check_out",
              "type": "text"
            },
            {
              "key": "params",
              "value": "{\"event_id\":\"dolore sit laborum Duis\",\"change_key\":\"ea adipisicing velit\",\"calendar_id\":\"ullamco labore dolore mollit\",\"resource_email\":\"U45sjN@qkwQqRsglYQapYeGbizqBNN.mgc\"}",
              "type": "text"
            }
          ]
        },
        "url": {
          "raw": "{{baseUrl}}/rooms/:id/events",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "rooms",
            ":id",
            "events"
          ],
          "variable": [
            {
              "key": "id",
              "value": "quis officia in reprehenderit",
              "description": "(Required) Room ID"
            }
          ]
        }
      },
      "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>\n**Error Code:** `1012` <br>\nRoom does not exist: {roomId}.\n\n\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": "quis consectetur veniam laboris",
              "description": "The value of this field can be one of the following:<br>\n* zoomroom.check_in\n* zoomroom.check_out",
              "type": "text"
            },
            {
              "key": "params",
              "value": "{\"event_id\":\"dolore sit laborum Duis\",\"change_key\":\"ea adipisicing velit\",\"calendar_id\":\"ullamco labore dolore mollit\",\"resource_email\":\"U45sjN@qkwQqRsglYQapYeGbizqBNN.mgc\"}",
              "type": "text"
            }
          ]
        },
        "url": {
          "raw": "{{baseUrl}}/rooms/:id/events",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "rooms",
            ":id",
            "events"
          ],
          "variable": [
            {
              "key": "id",
              "value": "quis officia in reprehenderit",
              "description": "(Required) Room ID"
            }
          ]
        }
      },
      "status": "Not Found",
      "code": 404,
      "_postman_previewlanguage": "text",
      "header": [
        {
          "key": "Content-Type",
          "value": "text/plain"
        }
      ],
      "cookie": [
      ],
      "body": ""
    }
  ]
}