Chilkat Online Tools

Ruby / Zoom API / Update options

Back to Collection Items

require 'chilkat'

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

http = Chilkat::CkHttp.new()

req = Chilkat::CkHttpRequest.new()
req.put_HttpVerb("PATCH")
req.put_Path("/v2/accounts/:accountId/options")
req.put_ContentType("multipart/form-data")
req.AddParam("share_rc","false")

req.AddParam("room_connector_list","false[\"cillum qui adipisicing cupidatat\",\"nisi officia nulla\"]")

req.AddParam("share_mc","false[\"cillum qui adipisicing cupidatat\",\"nisi officia nulla\"]false")

req.AddParam("meeting_connector_list","false[\"cillum qui adipisicing cupidatat\",\"nisi officia nulla\"]false[\"sed velit Excepteur\",\"nisi\"]")

req.AddParam("pay_mode","false[\"cillum qui adipisicing cupidatat\",\"nisi officia nulla\"]false[\"sed velit Excepteur\",\"nisi\"]master")

req.AddParam("billing_auto_renew","false[\"cillum qui adipisicing cupidatat\",\"nisi officia nulla\"]false[\"sed velit Excepteur\",\"nisi\"]mastertrue")

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

# resp is a CkHttpResponse
resp = http.SynchronousRequest("api.zoom.us",443,true,req)
if (http.get_LastMethodSuccess() == false)
    print http.lastErrorText() + "\n";
    exit
end

print resp.get_StatusCode().to_s() + "\n";
print resp.bodyStr() + "\n";

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