delphiAx / Zoom API / Delete a user's TSP account
Back to Collection Items
var
http: TChilkatHttp;
success: Integer;
resp: IChilkatHttpResponse;
respStatusCode: Integer;
begin
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
http := TChilkatHttp.Create(Self);
// Adds the "Authorization: Bearer <access_token>" header.
http.AuthToken := '<access_token>';
resp := http.QuickRequest('DELETE','https://api.zoom.us/v2/users/:userId/tsp/:tspId');
if (http.LastMethodSuccess = 0) then
begin
Memo1.Lines.Add(http.LastErrorText);
Exit;
end;
respStatusCode := resp.StatusCode;
Memo1.Lines.Add('Response Status Code = ' + IntToStr(respStatusCode));
if (respStatusCode <> 204) then
begin
Memo1.Lines.Add('Response Header:');
Memo1.Lines.Add(resp.Header);
Memo1.Lines.Add('Response Body:');
Memo1.Lines.Add(resp.BodyStr);
Memo1.Lines.Add('Failed.');
Exit;
end;
Memo1.Lines.Add('Success.');
Curl Command
curl -X DELETE
-H "Authorization: Bearer <access_token>"
https://api.zoom.us/v2/users/:userId/tsp/:tspId
Postman Collection Item JSON
{
"name": "Delete a user's TSP account",
"request": {
"method": "DELETE",
"header": [
],
"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": "Delete 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": "**Status Code:** `204` **No Content**<br>\nTSP account deleted.",
"originalRequest": {
"method": "DELETE",
"header": [
{
"description": "Added as a part of security scheme: oauth2",
"key": "Authorization",
"value": "<token>"
}
],
"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 not enable 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>\nAt ",
"originalRequest": {
"method": "DELETE",
"header": [
{
"description": "Added as a part of security scheme: oauth2",
"key": "Authorization",
"value": "<token>"
}
],
"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": "DELETE",
"header": [
{
"description": "Added as a part of security scheme: oauth2",
"key": "Authorization",
"value": "<token>"
}
],
"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": ""
}
]
}