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
$oHttp.SetRequestHeader "Authorization",""
Local $oResp = $oHttp.QuickRequest("DELETE","https://api.squadcast.com/v3/users/:userID")
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 DELETE
-H "Authorization: "
https://api.squadcast.com/v3/users/:userID
Postman Collection Item JSON
{
"name": "Remove User",
"request": {
"auth": {
"type": "noauth"
},
"method": "DELETE",
"header": [
{
"key": "Authorization",
"value": ""
}
],
"url": {
"raw": "{{baseUrl}}/users/:userID",
"host": [
"{{baseUrl}}"
],
"path": [
"users",
":userID"
],
"variable": [
{
"key": "userID",
"value": "<string>",
"type": "string",
"description": "(Required) user id"
}
]
},
"description": "Remove user from organization. Upon sccess the user will be removed from the organization.\nRequires `access_token` as a `Bearer {{token}}` in the `Authorization` header with `user-write` scope."
},
"response": [
{
"name": "Forbidden",
"originalRequest": {
"method": "DELETE",
"header": [
],
"url": {
"raw": "{{baseUrl}}/users/:userID",
"host": [
"{{baseUrl}}"
],
"path": [
"users",
":userID"
],
"variable": [
{
"key": "userID"
}
]
}
},
"status": "Forbidden",
"code": 403,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"cookie": [
],
"body": "{\n \"meta\": {\n \"status\": \"<integer>\",\n \"error_message\": \"<string>\"\n }\n}"
},
{
"name": "Internal Server Error",
"originalRequest": {
"method": "DELETE",
"header": [
],
"url": {
"raw": "{{baseUrl}}/users/:userID",
"host": [
"{{baseUrl}}"
],
"path": [
"users",
":userID"
],
"variable": [
{
"key": "userID"
}
]
}
},
"status": "Internal Server Error",
"code": 500,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"cookie": [
],
"body": "{\n \"meta\": {\n \"status\": \"<integer>\",\n \"error_message\": \"<string>\"\n }\n}"
},
{
"name": "Unauthorized",
"originalRequest": {
"method": "DELETE",
"header": [
],
"url": {
"raw": "{{baseUrl}}/users/:userID",
"host": [
"{{baseUrl}}"
],
"path": [
"users",
":userID"
],
"variable": [
{
"key": "userID"
}
]
}
},
"status": "Unauthorized",
"code": 401,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"cookie": [
],
"body": "{\n \"meta\": {\n \"status\": \"<integer>\",\n \"error_message\": \"<string>\"\n }\n}"
},
{
"name": "Not Found",
"originalRequest": {
"method": "DELETE",
"header": [
],
"url": {
"raw": "{{baseUrl}}/users/:userID",
"host": [
"{{baseUrl}}"
],
"path": [
"users",
":userID"
],
"variable": [
{
"key": "userID"
}
]
}
},
"status": "Not Found",
"code": 404,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"cookie": [
],
"body": "{\n \"meta\": {\n \"status\": \"<integer>\",\n \"error_message\": \"<string>\"\n }\n}"
},
{
"name": "No Content",
"originalRequest": {
"method": "DELETE",
"header": [
],
"url": {
"raw": "{{baseUrl}}/users/:userID",
"host": [
"{{baseUrl}}"
],
"path": [
"users",
":userID"
],
"variable": [
{
"key": "userID"
}
]
}
},
"status": "No Content",
"code": 204,
"_postman_previewlanguage": "text",
"header": [
{
"key": "Content-Type",
"value": "text/plain"
}
],
"cookie": [
],
"body": ""
}
]
}