Chilkat Online Tools

DataFlex / Zoom API / Create a H.323/SIP device

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
    String sTemp1
    Integer iTemp1
    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 "POST"
    Set ComPath Of hoReq To "/v2/h323/devices"
    Set ComContentType Of hoReq To "multipart/form-data"
    Send ComAddParam To hoReq "lab" ""

    Send ComAddParam To hoReq "protocol" "labH.323"

    Send ComAddParam To hoReq "ip" "labH.323irure ea voluptate eiusmod amet"

    Send ComAddParam To hoReq "encryption" "labH.323irure ea voluptate eiusmod ametyes"

    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 ComStatusCode Of hoResp To iTemp1
    Showln iTemp1
    Get ComBodyStr Of hoResp To sTemp1
    Showln sTemp1
    Send Destroy of hoResp


End_Procedure

Curl Command

curl -X POST
	-H "Authorization: Bearer <access_token>"
	-H "Content-Type: multipart/form-data"
	--form 'name=lab'
	--form 'protocol=labH.323'
	--form 'ip=labH.323irure ea voluptate eiusmod amet'
	--form 'encryption=labH.323irure ea voluptate eiusmod ametyes'
https://api.zoom.us/v2/h323/devices

Postman Collection Item JSON

{
  "name": "Create a H.323/SIP device",
  "request": {
    "auth": {
      "type": "oauth2"
    },
    "method": "POST",
    "header": [
      {
        "key": "Content-Type",
        "value": "multipart/form-data"
      }
    ],
    "body": {
      "mode": "formdata",
      "formdata": [
        {
          "key": "name",
          "value": "lab",
          "description": "(Required) Device name.",
          "type": "text"
        },
        {
          "key": "protocol",
          "value": "H.323",
          "description": "(Required) Device protocol:<br>`H.323` - H.323.<br>`SIP` - SIP. (This can only be one of H.323,SIP)",
          "type": "text"
        },
        {
          "key": "ip",
          "value": "irure ea voluptate eiusmod amet",
          "description": "(Required) Device IP.",
          "type": "text"
        },
        {
          "key": "encryption",
          "value": "yes",
          "description": "(Required) Device encryption:<br>`auto` - auto.<br>`yes` - yes.<br>`no` - no. (This can only be one of auto,yes,no)",
          "type": "text"
        }
      ]
    },
    "url": {
      "raw": "{{baseUrl}}/h323/devices",
      "host": [
        "{{baseUrl}}"
      ],
      "path": [
        "h323",
        "devices"
      ]
    },
    "description": "A H.323 or SIP device can make a video call to a [Room Connector](https://support.zoom.us/hc/en-us/articles/201363273-Getting-Started-With-H-323-SIP-Room-Connector) to join a Zoom cloud meeting. A Room Connector can also call out to a H.323 or SIP device to join a Zoom cloud meeting. Use this API to add a H.323/SIP device to your Zoom account<br><br>\n**Scopes:** `h323:write:admin`<br>\n\n **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Light` <br>"
  },
  "response": [
    {
      "name": "**Error Code:** `200`<br>\nNo permission.",
      "originalRequest": {
        "method": "POST",
        "header": [
          {
            "description": "Added as a part of security scheme: oauth2",
            "key": "Authorization",
            "value": "<token>"
          }
        ],
        "body": {
          "mode": "formdata",
          "formdata": [
            {
              "key": "name",
              "value": "lab",
              "description": "(Required) Device name.",
              "type": "text"
            },
            {
              "key": "protocol",
              "value": "H.323",
              "description": "(Required) Device protocol:<br>`H.323` - H.323.<br>`SIP` - SIP. (This can only be one of H.323,SIP)",
              "type": "text"
            },
            {
              "key": "ip",
              "value": "irure ea voluptate eiusmod amet",
              "description": "(Required) Device IP.",
              "type": "text"
            },
            {
              "key": "encryption",
              "value": "yes",
              "description": "(Required) Device encryption:<br>`auto` - auto.<br>`yes` - yes.<br>`no` - no. (This can only be one of auto,yes,no)",
              "type": "text"
            }
          ]
        },
        "url": {
          "raw": "{{baseUrl}}/h323/devices",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "h323",
            "devices"
          ]
        }
      },
      "status": "OK",
      "code": 200,
      "_postman_previewlanguage": "text",
      "header": [
        {
          "key": "Content-Type",
          "value": "text/plain"
        }
      ],
      "cookie": [
      ],
      "body": ""
    },
    {
      "name": "**HTTP Status Code:** `201`<br>\nH.323/SIP device created.",
      "originalRequest": {
        "method": "POST",
        "header": [
          {
            "description": "Added as a part of security scheme: oauth2",
            "key": "Authorization",
            "value": "<token>"
          }
        ],
        "body": {
          "mode": "formdata",
          "formdata": [
            {
              "key": "name",
              "value": "lab",
              "description": "(Required) Device name.",
              "type": "text"
            },
            {
              "key": "protocol",
              "value": "H.323",
              "description": "(Required) Device protocol:<br>`H.323` - H.323.<br>`SIP` - SIP. (This can only be one of H.323,SIP)",
              "type": "text"
            },
            {
              "key": "ip",
              "value": "irure ea voluptate eiusmod amet",
              "description": "(Required) Device IP.",
              "type": "text"
            },
            {
              "key": "encryption",
              "value": "yes",
              "description": "(Required) Device encryption:<br>`auto` - auto.<br>`yes` - yes.<br>`no` - no. (This can only be one of auto,yes,no)",
              "type": "text"
            }
          ]
        },
        "url": {
          "raw": "{{baseUrl}}/h323/devices",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "h323",
            "devices"
          ]
        }
      },
      "status": "Created",
      "code": 201,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Content-Location",
          "value": "quis officia in reprehenderit",
          "description": "Location of created device"
        },
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "{\n \"id\": \"string\",\n \"name\": \"string\",\n \"protocol\": \"string\",\n \"ip\": \"string\",\n \"encryption\": \"string\"\n}"
    },
    {
      "name": "**HTTP Status Code:** `404`<br>\n**Error Code:** `2020`<br>\nH.323 device's display name:{displayName} is already in use.\n",
      "originalRequest": {
        "method": "POST",
        "header": [
          {
            "description": "Added as a part of security scheme: oauth2",
            "key": "Authorization",
            "value": "<token>"
          }
        ],
        "body": {
          "mode": "formdata",
          "formdata": [
            {
              "key": "name",
              "value": "lab",
              "description": "(Required) Device name.",
              "type": "text"
            },
            {
              "key": "protocol",
              "value": "H.323",
              "description": "(Required) Device protocol:<br>`H.323` - H.323.<br>`SIP` - SIP. (This can only be one of H.323,SIP)",
              "type": "text"
            },
            {
              "key": "ip",
              "value": "irure ea voluptate eiusmod amet",
              "description": "(Required) Device IP.",
              "type": "text"
            },
            {
              "key": "encryption",
              "value": "yes",
              "description": "(Required) Device encryption:<br>`auto` - auto.<br>`yes` - yes.<br>`no` - no. (This can only be one of auto,yes,no)",
              "type": "text"
            }
          ]
        },
        "url": {
          "raw": "{{baseUrl}}/h323/devices",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "h323",
            "devices"
          ]
        }
      },
      "status": "Not Found",
      "code": 404,
      "_postman_previewlanguage": "text",
      "header": [
        {
          "key": "Content-Type",
          "value": "text/plain"
        }
      ],
      "cookie": [
      ],
      "body": ""
    }
  ]
}