Chilkat Online Tools

PowerBuilder / Zoom API / Update account's TSP information

Back to Collection Items

integer li_rc
oleobject loo_Http
integer li_Success
oleobject loo_Req
oleobject loo_Resp
integer li_RespStatusCode

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

loo_Http = create oleobject
li_rc = loo_Http.ConnectToNewObject("Chilkat_9_5_0.Http")
if li_rc < 0 then
    destroy loo_Http
    MessageBox("Error","Connecting to COM object failed")
    return
end if

loo_Req = create oleobject
li_rc = loo_Req.ConnectToNewObject("Chilkat_9_5_0.HttpRequest")

loo_Req.HttpVerb = "PATCH"
loo_Req.Path = "/v2/tsp"
loo_Req.ContentType = "multipart/form-data"
loo_Req.AddParam("tsp_provider","Excepteur Duis")

loo_Req.AddParam("enable","Excepteur Duisfalse")

loo_Req.AddParam("tsp_enabled","Excepteur Duisfalsefalse")

loo_Req.AddParam("master_account_setting_extended","Excepteur Duisfalsefalsetrue")

loo_Req.AddParam("modify_credential_forbidden","Excepteur Duisfalsefalsetruefalse")

loo_Req.AddParam("dial_in_number_unrestricted","Excepteur Duisfalsefalsetruefalsefalse")

loo_Req.AddParam("tsp_bridge","Excepteur DuisfalsefalsetruefalsefalseUS_TSP_TB")

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

loo_Resp = loo_Http.SynchronousRequest("api.zoom.us",443,1,loo_Req)
if loo_Http.LastMethodSuccess = 0 then
    Write-Debug loo_Http.LastErrorText
    destroy loo_Http
    destroy loo_Req
    return
end if

li_RespStatusCode = loo_Resp.StatusCode
Write-Debug "Response Status Code = " + string(li_RespStatusCode)
if li_RespStatusCode <> 204 then
    Write-Debug "Response Header:"
    Write-Debug loo_Resp.Header
    Write-Debug "Response Body:"
    Write-Debug loo_Resp.BodyStr
    Write-Debug "Failed."
    destroy loo_Resp
    destroy loo_Http
    destroy loo_Req
    return
end if

destroy loo_Resp
Write-Debug "Success."


destroy loo_Http
destroy loo_Req

Curl Command

curl -X PATCH
	-H "Authorization: Bearer <access_token>"
	-H "Content-Type: multipart/form-data"
	--form 'tsp_provider=Excepteur Duis'
	--form 'enable=Excepteur Duisfalse'
	--form 'tsp_enabled=Excepteur Duisfalsefalse'
	--form 'master_account_setting_extended=Excepteur Duisfalsefalsetrue'
	--form 'modify_credential_forbidden=Excepteur Duisfalsefalsetruefalse'
	--form 'dial_in_number_unrestricted=Excepteur Duisfalsefalsetruefalsefalse'
	--form 'tsp_bridge=Excepteur DuisfalsefalsetruefalsefalseUS_TSP_TB'
https://api.zoom.us/v2/tsp

Postman Collection Item JSON

{
  "name": "Update account's TSP information",
  "request": {
    "method": "PATCH",
    "header": [
      {
        "key": "Content-Type",
        "value": "multipart/form-data"
      }
    ],
    "body": {
      "mode": "formdata",
      "formdata": [
        {
          "key": "tsp_provider",
          "value": "Excepteur Duis",
          "description": "3rd party audio conferencing provider",
          "type": "text"
        },
        {
          "key": "enable",
          "value": "false",
          "description": "Enable 3rd party audio conferencing for account users",
          "type": "text"
        },
        {
          "key": "tsp_enabled",
          "value": "false",
          "description": "Enable TSP feature for account. This has to be enabled to use any other tsp settings/features.",
          "type": "text"
        },
        {
          "key": "master_account_setting_extended",
          "value": "true",
          "description": "For master account, extend its TSP setting to all sub accounts. For sub account, extend TSP setting from master account.",
          "type": "text"
        },
        {
          "key": "modify_credential_forbidden",
          "value": "false",
          "description": "Control restriction on account users being able to modify their TSP credentials.",
          "type": "text"
        },
        {
          "key": "dial_in_number_unrestricted",
          "value": "false",
          "description": "Control restriction on account users adding a TSP number outside of account's dial in numbers.",
          "type": "text"
        },
        {
          "key": "tsp_bridge",
          "value": "US_TSP_TB",
          "description": "Telephony bridge (This can only be one of US_TSP_TB,EU_TSP_TB)",
          "type": "text"
        }
      ]
    },
    "url": {
      "raw": "{{baseUrl}}/tsp",
      "host": [
        "{{baseUrl}}"
      ],
      "path": [
        "tsp"
      ]
    },
    "description": "Update information of the Telephony Service Provider set up on an account.<br>\n**Prerequisites**:<br>\nTSP account option should be enabled.<br>\n**Scopes:** `tsp:write:admin`<br>\n \n **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Light`\n"
  },
  "response": [
    {
      "name": "**HTTP Status Code:** `204` **No Content**<br>\nTSP Account updated.",
      "originalRequest": {
        "method": "PATCH",
        "header": [
          {
            "description": "Added as a part of security scheme: oauth2",
            "key": "Authorization",
            "value": "<token>"
          }
        ],
        "body": {
          "mode": "formdata",
          "formdata": [
            {
              "key": "tsp_provider",
              "value": "Excepteur Duis",
              "description": "3rd party audio conferencing provider",
              "type": "text"
            },
            {
              "key": "enable",
              "value": "false",
              "description": "Enable 3rd party audio conferencing for account users",
              "type": "text"
            },
            {
              "key": "tsp_enabled",
              "value": "false",
              "description": "Enable TSP feature for account. This has to be enabled to use any other tsp settings/features.",
              "type": "text"
            },
            {
              "key": "master_account_setting_extended",
              "value": "true",
              "description": "For master account, extend its TSP setting to all sub accounts. For sub account, extend TSP setting from master account.",
              "type": "text"
            },
            {
              "key": "modify_credential_forbidden",
              "value": "false",
              "description": "Control restriction on account users being able to modify their TSP credentials.",
              "type": "text"
            },
            {
              "key": "dial_in_number_unrestricted",
              "value": "false",
              "description": "Control restriction on account users adding a TSP number outside of account's dial in numbers.",
              "type": "text"
            },
            {
              "key": "tsp_bridge",
              "value": "US_TSP_TB",
              "description": "Telephony bridge (This can only be one of US_TSP_TB,EU_TSP_TB)",
              "type": "text"
            }
          ]
        },
        "url": {
          "raw": "{{baseUrl}}/tsp",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "tsp"
          ]
        }
      },
      "status": "No Content",
      "code": 204,
      "_postman_previewlanguage": "text",
      "header": [
        {
          "key": "Content-Type",
          "value": "text/plain"
        }
      ],
      "cookie": [
      ],
      "body": ""
    },
    {
      "name": "**HTTP Status Code:** `400`<br>\nBad request.<br>\n\n**Error Code:** `300`<br>\nInvalid parameter: tsp_bridge.",
      "originalRequest": {
        "method": "PATCH",
        "header": [
          {
            "description": "Added as a part of security scheme: oauth2",
            "key": "Authorization",
            "value": "<token>"
          }
        ],
        "body": {
          "mode": "formdata",
          "formdata": [
            {
              "key": "tsp_provider",
              "value": "Excepteur Duis",
              "description": "3rd party audio conferencing provider",
              "type": "text"
            },
            {
              "key": "enable",
              "value": "false",
              "description": "Enable 3rd party audio conferencing for account users",
              "type": "text"
            },
            {
              "key": "tsp_enabled",
              "value": "false",
              "description": "Enable TSP feature for account. This has to be enabled to use any other tsp settings/features.",
              "type": "text"
            },
            {
              "key": "master_account_setting_extended",
              "value": "true",
              "description": "For master account, extend its TSP setting to all sub accounts. For sub account, extend TSP setting from master account.",
              "type": "text"
            },
            {
              "key": "modify_credential_forbidden",
              "value": "false",
              "description": "Control restriction on account users being able to modify their TSP credentials.",
              "type": "text"
            },
            {
              "key": "dial_in_number_unrestricted",
              "value": "false",
              "description": "Control restriction on account users adding a TSP number outside of account's dial in numbers.",
              "type": "text"
            },
            {
              "key": "tsp_bridge",
              "value": "US_TSP_TB",
              "description": "Telephony bridge (This can only be one of US_TSP_TB,EU_TSP_TB)",
              "type": "text"
            }
          ]
        },
        "url": {
          "raw": "{{baseUrl}}/tsp",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "tsp"
          ]
        }
      },
      "status": "Bad Request",
      "code": 400,
      "_postman_previewlanguage": "text",
      "header": [
        {
          "key": "Content-Type",
          "value": "text/plain"
        }
      ],
      "cookie": [
      ],
      "body": ""
    }
  ]
}