Chilkat Online Tools

SQL Server / Zoom API / Update options

Back to Collection Items

-- Important: See this note about string length limitations for strings returned by sp_OAMethod calls.
--
CREATE PROCEDURE ChilkatSample
AS
BEGIN
    DECLARE @hr int
    DECLARE @iTmp0 int
    -- Important: Do not use nvarchar(max).  See the warning about using nvarchar(max).
    DECLARE @sTmp0 nvarchar(4000)
    -- This example assumes the Chilkat API to have been previously unlocked.
    -- See Global Unlock Sample for sample code.

    DECLARE @http int
    EXEC @hr = sp_OACreate 'Chilkat_9_5_0.Http', @http OUT
    IF @hr <> 0
    BEGIN
        PRINT 'Failed to create ActiveX component'
        RETURN
    END

    DECLARE @success int

    DECLARE @req int
    EXEC @hr = sp_OACreate 'Chilkat_9_5_0.HttpRequest', @req OUT

    EXEC sp_OASetProperty @req, 'HttpVerb', 'PATCH'
    EXEC sp_OASetProperty @req, 'Path', '/v2/accounts/:accountId/options'
    EXEC sp_OASetProperty @req, 'ContentType', 'multipart/form-data'
    EXEC sp_OAMethod @req, 'AddParam', NULL, 'share_rc', 'false'

    EXEC sp_OAMethod @req, 'AddParam', NULL, 'room_connector_list', 'false["cillum qui adipisicing cupidatat","nisi officia nulla"]'

    EXEC sp_OAMethod @req, 'AddParam', NULL, 'share_mc', 'false["cillum qui adipisicing cupidatat","nisi officia nulla"]false'

    EXEC sp_OAMethod @req, 'AddParam', NULL, 'meeting_connector_list', 'false["cillum qui adipisicing cupidatat","nisi officia nulla"]false["sed velit Excepteur","nisi"]'

    EXEC sp_OAMethod @req, 'AddParam', NULL, 'pay_mode', 'false["cillum qui adipisicing cupidatat","nisi officia nulla"]false["sed velit Excepteur","nisi"]master'

    EXEC sp_OAMethod @req, 'AddParam', NULL, 'billing_auto_renew', 'false["cillum qui adipisicing cupidatat","nisi officia nulla"]false["sed velit Excepteur","nisi"]mastertrue'

    EXEC sp_OAMethod @req, 'AddHeader', NULL, 'Authorization', 'Bearer <access_token>'

    DECLARE @resp int
    EXEC sp_OAMethod @http, 'SynchronousRequest', @resp OUT, 'api.zoom.us', 443, 1, @req
    EXEC sp_OAGetProperty @http, 'LastMethodSuccess', @iTmp0 OUT
    IF @iTmp0 = 0
      BEGIN
        EXEC sp_OAGetProperty @http, 'LastErrorText', @sTmp0 OUT
        PRINT @sTmp0
        EXEC @hr = sp_OADestroy @http
        EXEC @hr = sp_OADestroy @req
        RETURN
      END

    EXEC sp_OAGetProperty @resp, 'StatusCode', @iTmp0 OUT
    PRINT @iTmp0
    EXEC sp_OAGetProperty @resp, 'BodyStr', @sTmp0 OUT
    PRINT @sTmp0
    EXEC @hr = sp_OADestroy @resp


    EXEC @hr = sp_OADestroy @http
    EXEC @hr = sp_OADestroy @req


END
GO

Curl Command

curl -X PATCH
	-H "Authorization: Bearer <access_token>"
	-H "Content-Type: multipart/form-data"
	--form 'share_rc=false'
	--form 'room_connector_list=false["cillum qui adipisicing cupidatat","nisi officia nulla"]'
	--form 'share_mc=false["cillum qui adipisicing cupidatat","nisi officia nulla"]false'
	--form 'meeting_connector_list=false["cillum qui adipisicing cupidatat","nisi officia nulla"]false["sed velit Excepteur","nisi"]'
	--form 'pay_mode=false["cillum qui adipisicing cupidatat","nisi officia nulla"]false["sed velit Excepteur","nisi"]master'
	--form 'billing_auto_renew=false["cillum qui adipisicing cupidatat","nisi officia nulla"]false["sed velit Excepteur","nisi"]mastertrue'
https://api.zoom.us/v2/accounts/:accountId/options

Postman Collection Item JSON

{
  "name": "Update options",
  "request": {
    "auth": {
      "type": "oauth2"
    },
    "method": "PATCH",
    "header": [
      {
        "key": "Content-Type",
        "value": "multipart/form-data"
      }
    ],
    "body": {
      "mode": "formdata",
      "formdata": [
        {
          "key": "share_rc",
          "value": "false",
          "description": "Enable/disable the option for a sub account to use shared [Virtual Room Connector(s)](https://support.zoom.us/hc/en-us/articles/202134758-Getting-Started-With-Virtual-Room-Connector) that are set up by the master account. Virtual Room Connectors can only be used by On-prem users.",
          "type": "text"
        },
        {
          "key": "room_connector_list",
          "value": "[\"cillum qui adipisicing cupidatat\",\"nisi officia nulla\"]",
          "description": "Specify the IP addresses of the Room Connectors that you would like to share with the sub account. Multiple values can be separated by comma. If no value is provided in this field, all the Room Connectors of a master account will be shared with the sub account.\n\n\n**Note:** This option can only be used if the value of `share_rc` is set to `true`.",
          "type": "text"
        },
        {
          "key": "share_mc",
          "value": "false",
          "description": "Enable/disable the option for a sub account to use shared [Meeting Connector(s)](https://support.zoom.us/hc/en-us/articles/201363093-Getting-Started-with-the-Meeting-Connector) that are set up by the master account. Meeting Connectors can only be used by On-prem users.",
          "type": "text"
        },
        {
          "key": "meeting_connector_list",
          "value": "[\"sed velit Excepteur\",\"nisi\"]",
          "description": "Specify the IP addresses of the Meeting Connectors that you would like to share with the sub account. Multiple values can be separated by comma. If no value is provided in this field, all the Meeting Connectors of a master account will be shared with the sub account.\n\n\n**Note:** This option can only be used if the value of `share_mc` is set to `true`.",
          "type": "text"
        },
        {
          "key": "pay_mode",
          "value": "master",
          "description": "Payee:<br>`master` - master account holder pays.<br>`sub` - Sub account holder pays. (This can only be one of master,sub)",
          "type": "text"
        },
        {
          "key": "billing_auto_renew",
          "value": "true",
          "description": "Toggle whether automatic billing renewal is on or off.",
          "type": "text"
        }
      ]
    },
    "url": {
      "raw": "{{baseUrl}}/accounts/:accountId/options",
      "host": [
        "{{baseUrl}}"
      ],
      "path": [
        "accounts",
        ":accountId",
        "options"
      ],
      "variable": [
        {
          "key": "accountId",
          "value": "quis officia in reprehenderit",
          "description": "(Required) The account's ID."
        }
      ]
    },
    "description": "Update a sub account's options under the master account.<br> <aside>Your account must be a master account in order to update the options for sub accounts. Zoom only assigns this privilege to trusted partners. </aside>\n\n**Prerequisites:**\n* Pro or a higher paid account with master account option enabled.\n* The account making this API request must be a [master account](https://marketplace.zoom.us/docs/api-reference/master-account-apis).<br><br>\n\n**Scope**: `account:write:admin`<br>\n**[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Light`<br>\n\n\n "
  },
  "response": [
    {
      "name": "**Error Code:** `200`<br>\nThe pay mode cannot be updated for a sub account which already has an existing plan.",
      "originalRequest": {
        "method": "PATCH",
        "header": [
          {
            "description": "Added as a part of security scheme: oauth2",
            "key": "Authorization",
            "value": "<token>"
          }
        ],
        "body": {
          "mode": "formdata",
          "formdata": [
            {
              "key": "share_rc",
              "value": "false",
              "description": "Enable/disable the option for a sub account to use shared [Virtual Room Connector(s)](https://support.zoom.us/hc/en-us/articles/202134758-Getting-Started-With-Virtual-Room-Connector) that are set up by the master account. Virtual Room Connectors can only be used by On-prem users.",
              "type": "text"
            },
            {
              "key": "room_connector_list",
              "value": "[\"officia dolor deserunt elit tempor\",\"dolor ullamco\"]",
              "description": "Specify the IP addresses of the Room Connectors that you would like to share with the sub account. Multiple values can be separated by comma. If no value is provided in this field, all the Room Connectors of a master account will be shared with the sub account.\n\n\n**Note:** This option can only be used if the value of `share_rc` is set to `true`.",
              "type": "text"
            },
            {
              "key": "share_mc",
              "value": "false",
              "description": "Enable/disable the option for a sub account to use shared [Meeting Connector(s)](https://support.zoom.us/hc/en-us/articles/201363093-Getting-Started-with-the-Meeting-Connector) that are set up by the master account. Meeting Connectors can only be used by On-prem users.",
              "type": "text"
            },
            {
              "key": "meeting_connector_list",
              "value": "[\"fugiat et nisi\",\"dolor officia aliquip sed\"]",
              "description": "Specify the IP addresses of the Meeting Connectors that you would like to share with the sub account. Multiple values can be separated by comma. If no value is provided in this field, all the Meeting Connectors of a master account will be shared with the sub account.\n\n\n**Note:** This option can only be used if the value of `share_mc` is set to `true`.",
              "type": "text"
            },
            {
              "key": "pay_mode",
              "value": "master",
              "description": "Payee:<br>`master` - master account holder pays.<br>`sub` - Sub account holder pays. (This can only be one of master,sub)",
              "type": "text"
            },
            {
              "key": "billing_auto_renew",
              "value": "true",
              "description": "Toggle whether automatic billing renewal is on or off.",
              "type": "text"
            }
          ]
        },
        "url": {
          "raw": "{{baseUrl}}/accounts/:accountId/options",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "accounts",
            ":accountId",
            "options"
          ],
          "variable": [
            {
              "key": "accountId",
              "value": "quis officia in reprehenderit",
              "description": "(Required) The account's ID."
            }
          ]
        }
      },
      "status": "OK",
      "code": 200,
      "_postman_previewlanguage": "text",
      "header": [
        {
          "key": "Content-Type",
          "value": "text/plain"
        }
      ],
      "cookie": [
      ],
      "body": ""
    },
    {
      "name": "**HTTP Status Code:** `204`<br>\nAccount options updated.",
      "originalRequest": {
        "method": "PATCH",
        "header": [
          {
            "description": "Added as a part of security scheme: oauth2",
            "key": "Authorization",
            "value": "<token>"
          }
        ],
        "body": {
          "mode": "formdata",
          "formdata": [
            {
              "key": "share_rc",
              "value": "false",
              "description": "Enable/disable the option for a sub account to use shared [Virtual Room Connector(s)](https://support.zoom.us/hc/en-us/articles/202134758-Getting-Started-With-Virtual-Room-Connector) that are set up by the master account. Virtual Room Connectors can only be used by On-prem users.",
              "type": "text"
            },
            {
              "key": "room_connector_list",
              "value": "[\"officia dolor deserunt elit tempor\",\"dolor ullamco\"]",
              "description": "Specify the IP addresses of the Room Connectors that you would like to share with the sub account. Multiple values can be separated by comma. If no value is provided in this field, all the Room Connectors of a master account will be shared with the sub account.\n\n\n**Note:** This option can only be used if the value of `share_rc` is set to `true`.",
              "type": "text"
            },
            {
              "key": "share_mc",
              "value": "false",
              "description": "Enable/disable the option for a sub account to use shared [Meeting Connector(s)](https://support.zoom.us/hc/en-us/articles/201363093-Getting-Started-with-the-Meeting-Connector) that are set up by the master account. Meeting Connectors can only be used by On-prem users.",
              "type": "text"
            },
            {
              "key": "meeting_connector_list",
              "value": "[\"fugiat et nisi\",\"dolor officia aliquip sed\"]",
              "description": "Specify the IP addresses of the Meeting Connectors that you would like to share with the sub account. Multiple values can be separated by comma. If no value is provided in this field, all the Meeting Connectors of a master account will be shared with the sub account.\n\n\n**Note:** This option can only be used if the value of `share_mc` is set to `true`.",
              "type": "text"
            },
            {
              "key": "pay_mode",
              "value": "master",
              "description": "Payee:<br>`master` - master account holder pays.<br>`sub` - Sub account holder pays. (This can only be one of master,sub)",
              "type": "text"
            },
            {
              "key": "billing_auto_renew",
              "value": "true",
              "description": "Toggle whether automatic billing renewal is on or off.",
              "type": "text"
            }
          ]
        },
        "url": {
          "raw": "{{baseUrl}}/accounts/:accountId/options",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "accounts",
            ":accountId",
            "options"
          ],
          "variable": [
            {
              "key": "accountId",
              "value": "quis officia in reprehenderit",
              "description": "(Required) The account's ID."
            }
          ]
        }
      },
      "status": "No Content",
      "code": 204,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "{\n \"share_rc\": \"boolean\",\n \"room_connectors\": \"string\",\n \"share_mc\": \"boolean\",\n \"meeting_connectors\": \"string\",\n \"pay_mode\": \"string\"\n}"
    },
    {
      "name": "**HTTP Status Code:** `400`<br>\n**Error Code:** `2100`<br> The collection method cannot be changed after the purchase is complete.",
      "originalRequest": {
        "method": "PATCH",
        "header": [
          {
            "description": "Added as a part of security scheme: oauth2",
            "key": "Authorization",
            "value": "<token>"
          }
        ],
        "body": {
          "mode": "formdata",
          "formdata": [
            {
              "key": "share_rc",
              "value": "false",
              "description": "Enable/disable the option for a sub account to use shared [Virtual Room Connector(s)](https://support.zoom.us/hc/en-us/articles/202134758-Getting-Started-With-Virtual-Room-Connector) that are set up by the master account. Virtual Room Connectors can only be used by On-prem users.",
              "type": "text"
            },
            {
              "key": "room_connector_list",
              "value": "[\"officia dolor deserunt elit tempor\",\"dolor ullamco\"]",
              "description": "Specify the IP addresses of the Room Connectors that you would like to share with the sub account. Multiple values can be separated by comma. If no value is provided in this field, all the Room Connectors of a master account will be shared with the sub account.\n\n\n**Note:** This option can only be used if the value of `share_rc` is set to `true`.",
              "type": "text"
            },
            {
              "key": "share_mc",
              "value": "false",
              "description": "Enable/disable the option for a sub account to use shared [Meeting Connector(s)](https://support.zoom.us/hc/en-us/articles/201363093-Getting-Started-with-the-Meeting-Connector) that are set up by the master account. Meeting Connectors can only be used by On-prem users.",
              "type": "text"
            },
            {
              "key": "meeting_connector_list",
              "value": "[\"fugiat et nisi\",\"dolor officia aliquip sed\"]",
              "description": "Specify the IP addresses of the Meeting Connectors that you would like to share with the sub account. Multiple values can be separated by comma. If no value is provided in this field, all the Meeting Connectors of a master account will be shared with the sub account.\n\n\n**Note:** This option can only be used if the value of `share_mc` is set to `true`.",
              "type": "text"
            },
            {
              "key": "pay_mode",
              "value": "master",
              "description": "Payee:<br>`master` - master account holder pays.<br>`sub` - Sub account holder pays. (This can only be one of master,sub)",
              "type": "text"
            },
            {
              "key": "billing_auto_renew",
              "value": "true",
              "description": "Toggle whether automatic billing renewal is on or off.",
              "type": "text"
            }
          ]
        },
        "url": {
          "raw": "{{baseUrl}}/accounts/:accountId/options",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "accounts",
            ":accountId",
            "options"
          ],
          "variable": [
            {
              "key": "accountId",
              "value": "quis officia in reprehenderit",
              "description": "(Required) The account'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>\n**Error Code:** `2001`<br>\nAccount does not exist: $subAccountId.",
      "originalRequest": {
        "method": "PATCH",
        "header": [
          {
            "description": "Added as a part of security scheme: oauth2",
            "key": "Authorization",
            "value": "<token>"
          }
        ],
        "body": {
          "mode": "formdata",
          "formdata": [
            {
              "key": "share_rc",
              "value": "false",
              "description": "Enable/disable the option for a sub account to use shared [Virtual Room Connector(s)](https://support.zoom.us/hc/en-us/articles/202134758-Getting-Started-With-Virtual-Room-Connector) that are set up by the master account. Virtual Room Connectors can only be used by On-prem users.",
              "type": "text"
            },
            {
              "key": "room_connector_list",
              "value": "[\"officia dolor deserunt elit tempor\",\"dolor ullamco\"]",
              "description": "Specify the IP addresses of the Room Connectors that you would like to share with the sub account. Multiple values can be separated by comma. If no value is provided in this field, all the Room Connectors of a master account will be shared with the sub account.\n\n\n**Note:** This option can only be used if the value of `share_rc` is set to `true`.",
              "type": "text"
            },
            {
              "key": "share_mc",
              "value": "false",
              "description": "Enable/disable the option for a sub account to use shared [Meeting Connector(s)](https://support.zoom.us/hc/en-us/articles/201363093-Getting-Started-with-the-Meeting-Connector) that are set up by the master account. Meeting Connectors can only be used by On-prem users.",
              "type": "text"
            },
            {
              "key": "meeting_connector_list",
              "value": "[\"fugiat et nisi\",\"dolor officia aliquip sed\"]",
              "description": "Specify the IP addresses of the Meeting Connectors that you would like to share with the sub account. Multiple values can be separated by comma. If no value is provided in this field, all the Meeting Connectors of a master account will be shared with the sub account.\n\n\n**Note:** This option can only be used if the value of `share_mc` is set to `true`.",
              "type": "text"
            },
            {
              "key": "pay_mode",
              "value": "master",
              "description": "Payee:<br>`master` - master account holder pays.<br>`sub` - Sub account holder pays. (This can only be one of master,sub)",
              "type": "text"
            },
            {
              "key": "billing_auto_renew",
              "value": "true",
              "description": "Toggle whether automatic billing renewal is on or off.",
              "type": "text"
            }
          ]
        },
        "url": {
          "raw": "{{baseUrl}}/accounts/:accountId/options",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "accounts",
            ":accountId",
            "options"
          ],
          "variable": [
            {
              "key": "accountId",
              "value": "quis officia in reprehenderit",
              "description": "(Required) The account's ID."
            }
          ]
        }
      },
      "status": "Not Found",
      "code": 404,
      "_postman_previewlanguage": "text",
      "header": [
        {
          "key": "Content-Type",
          "value": "text/plain"
        }
      ],
      "cookie": [
      ],
      "body": ""
    }
  ]
}