autoit / Zoom API / Update a TSP account
Back to Collection Items
; This example assumes the Chilkat API to have been previously unlocked.
; See Global Unlock Sample for sample code.
$oHttp = ObjCreate("Chilkat.Http")
Local $bSuccess
$oReq = ObjCreate("Chilkat.HttpRequest")
$oReq.HttpVerb = "PATCH"
$oReq.Path = "/v2/users/:userId/tsp/:tspId"
$oReq.ContentType = "multipart/form-data"
$oReq.AddParam "conference_code","exercit"
$oReq.AddParam "leader_pin","exercitculpa"
$oReq.AddParam "dial_in_numbers","exercitculpa[{""code"":""minim"",""number"":""consequat "",""type"":""toll"",""country_label"":""Ut ""},{""code"":""ut i"",""number"":""mi"",""type"":""media_link"",""country_label"":""sed de""}]"
$oReq.AddParam "tsp_bridge","exercitculpa[{""code"":""minim"",""number"":""consequat "",""type"":""toll"",""country_label"":""Ut ""},{""code"":""ut i"",""number"":""mi"",""type"":""media_link"",""country_label"":""sed de""}]EU_TSP_TB"
$oReq.AddHeader "Authorization","Bearer <access_token>"
Local $oResp = $oHttp.SynchronousRequest("api.zoom.us",443,True,$oReq)
If ($oHttp.LastMethodSuccess = False) Then
ConsoleWrite($oHttp.LastErrorText & @CRLF)
Exit
EndIf
Local $iRespStatusCode = $oResp.StatusCode
ConsoleWrite("Response Status Code = " & $iRespStatusCode & @CRLF)
If ($iRespStatusCode <> 204) Then
ConsoleWrite("Response Header:" & @CRLF)
ConsoleWrite($oResp.Header & @CRLF)
ConsoleWrite("Response Body:" & @CRLF)
ConsoleWrite($oResp.BodyStr & @CRLF)
ConsoleWrite("Failed." & @CRLF)
Exit
EndIf
ConsoleWrite("Success." & @CRLF)
Curl Command
curl -X PATCH
-H "Authorization: Bearer <access_token>"
-H "Content-Type: multipart/form-data"
--form 'conference_code=exercit'
--form 'leader_pin=exercitculpa'
--form 'dial_in_numbers=exercitculpa[{"code":"minim","number":"consequat ","type":"toll","country_label":"Ut "},{"code":"ut i","number":"mi","type":"media_link","country_label":"sed de"}]'
--form 'tsp_bridge=exercitculpa[{"code":"minim","number":"consequat ","type":"toll","country_label":"Ut "},{"code":"ut i","number":"mi","type":"media_link","country_label":"sed de"}]EU_TSP_TB'
https://api.zoom.us/v2/users/:userId/tsp/:tspId
Postman Collection Item JSON
{
"name": "Update a TSP account",
"request": {
"method": "PATCH",
"header": [
{
"key": "Content-Type",
"value": "multipart/form-data"
}
],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "conference_code",
"value": "exercit",
"description": "(Required) Conference code: numeric value, length is less than 16.",
"type": "text"
},
{
"key": "leader_pin",
"value": "culpa",
"description": "(Required) Leader PIN: numeric value, length is less than 16.",
"type": "text"
},
{
"key": "dial_in_numbers",
"value": "[{\"code\":\"minim\",\"number\":\"consequat \",\"type\":\"toll\",\"country_label\":\"Ut \"},{\"code\":\"ut i\",\"number\":\"mi\",\"type\":\"media_link\",\"country_label\":\"sed de\"}]",
"description": "List of dial in numbers.",
"type": "text"
},
{
"key": "tsp_bridge",
"value": "EU_TSP_TB",
"description": "Telephony bridge (This can only be one of US_TSP_TB,EU_TSP_TB)",
"type": "text"
}
]
},
"url": {
"raw": "{{baseUrl}}/users/:userId/tsp/:tspId",
"host": [
"{{baseUrl}}"
],
"path": [
"users",
":userId",
"tsp",
":tspId"
],
"variable": [
{
"key": "userId",
"value": "quis officia in reprehenderit",
"description": "(Required) The user ID or email address of the user. For user-level apps, pass the `me` value for this parameter."
},
{
"key": "tspId",
"value": "2",
"description": "(Required) TSP account ID."
}
]
},
"description": "Update a user's TSP account.<br><br>\n**Scopes:** `tsp:write:admin` `tsp:write`<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": "conference_code",
"value": "incididunt",
"description": "(Required) Conference code: numeric value, length is less than 16.",
"type": "text"
},
{
"key": "leader_pin",
"value": "nostrud offi",
"description": "(Required) Leader PIN: numeric value, length is less than 16.",
"type": "text"
},
{
"key": "dial_in_numbers",
"value": "[{\"code\":\"anim \",\"number\":\"Exc\",\"type\":\"media_link\",\"country_label\":\"non q\"},{\"code\":\"do \",\"number\":\"aliquip nis\",\"type\":\"toll\",\"country_label\":\"aute o\"}]",
"description": "List of dial in numbers.",
"type": "text"
},
{
"key": "tsp_bridge",
"value": "EU_TSP_TB",
"description": "Telephony bridge (This can only be one of US_TSP_TB,EU_TSP_TB)",
"type": "text"
}
]
},
"url": {
"raw": "{{baseUrl}}/users/:userId/tsp/:tspId",
"host": [
"{{baseUrl}}"
],
"path": [
"users",
":userId",
"tsp",
":tspId"
],
"variable": [
{
"key": "userId",
"value": "quis officia in reprehenderit",
"description": "(Required) The user ID or email address of the user. For user-level apps, pass the `me` value for this parameter."
},
{
"key": "tspId",
"value": "2",
"description": "(Required) TSP account ID."
}
]
}
},
"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**Error Code:**`2024`<br>\nAccount has not enabled TSP.<br>\n**Error Code:**`300`<br>\nThe TSP id provided does not exist.<br>\n**Error Code:**`300`<br>\nTSP Config does not exist.<br>\n**Error Code:**`300`<br>\nA",
"originalRequest": {
"method": "PATCH",
"header": [
{
"description": "Added as a part of security scheme: oauth2",
"key": "Authorization",
"value": "<token>"
}
],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "conference_code",
"value": "incididunt",
"description": "(Required) Conference code: numeric value, length is less than 16.",
"type": "text"
},
{
"key": "leader_pin",
"value": "nostrud offi",
"description": "(Required) Leader PIN: numeric value, length is less than 16.",
"type": "text"
},
{
"key": "dial_in_numbers",
"value": "[{\"code\":\"anim \",\"number\":\"Exc\",\"type\":\"media_link\",\"country_label\":\"non q\"},{\"code\":\"do \",\"number\":\"aliquip nis\",\"type\":\"toll\",\"country_label\":\"aute o\"}]",
"description": "List of dial in numbers.",
"type": "text"
},
{
"key": "tsp_bridge",
"value": "EU_TSP_TB",
"description": "Telephony bridge (This can only be one of US_TSP_TB,EU_TSP_TB)",
"type": "text"
}
]
},
"url": {
"raw": "{{baseUrl}}/users/:userId/tsp/:tspId",
"host": [
"{{baseUrl}}"
],
"path": [
"users",
":userId",
"tsp",
":tspId"
],
"variable": [
{
"key": "userId",
"value": "quis officia in reprehenderit",
"description": "(Required) The user ID or email address of the user. For user-level apps, pass the `me` value for this parameter."
},
{
"key": "tspId",
"value": "2",
"description": "(Required) TSP account ID."
}
]
}
},
"status": "Bad Request",
"code": 400,
"_postman_previewlanguage": "text",
"header": [
{
"key": "Content-Type",
"value": "text/plain"
}
],
"cookie": [
],
"body": ""
},
{
"name": "**HTTP Status Code:** `404`<br>\nNot Found.<br>\n**Error Code:** `1001`<br>\nUser does not exist: $userId.<br>\n**Error Code:**`1120`<br>\nA valid invitation to join the Zoom account was not found for this user.<br>\nThis error is thrown if you added a user in ",
"originalRequest": {
"method": "PATCH",
"header": [
{
"description": "Added as a part of security scheme: oauth2",
"key": "Authorization",
"value": "<token>"
}
],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "conference_code",
"value": "incididunt",
"description": "(Required) Conference code: numeric value, length is less than 16.",
"type": "text"
},
{
"key": "leader_pin",
"value": "nostrud offi",
"description": "(Required) Leader PIN: numeric value, length is less than 16.",
"type": "text"
},
{
"key": "dial_in_numbers",
"value": "[{\"code\":\"anim \",\"number\":\"Exc\",\"type\":\"media_link\",\"country_label\":\"non q\"},{\"code\":\"do \",\"number\":\"aliquip nis\",\"type\":\"toll\",\"country_label\":\"aute o\"}]",
"description": "List of dial in numbers.",
"type": "text"
},
{
"key": "tsp_bridge",
"value": "EU_TSP_TB",
"description": "Telephony bridge (This can only be one of US_TSP_TB,EU_TSP_TB)",
"type": "text"
}
]
},
"url": {
"raw": "{{baseUrl}}/users/:userId/tsp/:tspId",
"host": [
"{{baseUrl}}"
],
"path": [
"users",
":userId",
"tsp",
":tspId"
],
"variable": [
{
"key": "userId",
"value": "quis officia in reprehenderit",
"description": "(Required) The user ID or email address of the user. For user-level apps, pass the `me` value for this parameter."
},
{
"key": "tspId",
"value": "2",
"description": "(Required) TSP account ID."
}
]
}
},
"status": "Not Found",
"code": 404,
"_postman_previewlanguage": "text",
"header": [
{
"key": "Content-Type",
"value": "text/plain"
}
],
"cookie": [
],
"body": ""
}
]
}