PowerBuilder / Zoom API / Delete a user
Back to Collection Items
integer li_rc
oleobject loo_Http
integer li_Success
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
// Use "Chilkat_9_5_0.Http" for versions of Chilkat < 10.0.0
li_rc = loo_Http.ConnectToNewObject("Chilkat.Http")
if li_rc < 0 then
destroy loo_Http
MessageBox("Error","Connecting to COM object failed")
return
end if
// Adds the "Authorization: Bearer <access_token>" header.
loo_Http.AuthToken = "<access_token>"
loo_Resp = loo_Http.QuickRequest("DELETE","reprehenderit&transfer_meeting=true&transfer_webinar=true&transfer_recording=true")
if loo_Http.LastMethodSuccess = 0 then
Write-Debug loo_Http.LastErrorText
destroy loo_Http
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
return
end if
destroy loo_Resp
Write-Debug "Success."
destroy loo_Http
Curl Command
curl -X DELETE
-H "Authorization: Bearer <access_token>"
https://api.zoom.us/v2/users/:userId?action=disassociate&transfer_email=quis officia in reprehenderit&transfer_meeting=true&transfer_webinar=true&transfer_recording=true
Postman Collection Item JSON
{
"name": "Delete a user",
"request": {
"method": "DELETE",
"header": [
],
"url": {
"raw": "{{baseUrl}}/users/:userId?action=disassociate&transfer_email=quis officia in reprehenderit&transfer_meeting=true&transfer_webinar=true&transfer_recording=true",
"host": [
"{{baseUrl}}"
],
"path": [
"users",
":userId"
],
"query": [
{
"key": "action",
"value": "disassociate",
"description": "Delete action options:<br>`disassociate` - Disassociate a user.<br>`delete`- Permanently delete a user.<br>Note: To delete pending user in the account, use `disassociate`"
},
{
"key": "transfer_email",
"value": "quis officia in reprehenderit",
"description": "Transfer email. This field is **required** if the user has upcoming Zoom Events scheduled. After you delete or disassociate the user, the user's upcoming Zoom Events will be transferred to the target user."
},
{
"key": "transfer_meeting",
"value": "true",
"description": "Transfer meeting."
},
{
"key": "transfer_webinar",
"value": "true",
"description": "Transfer webinar."
},
{
"key": "transfer_recording",
"value": "true",
"description": "Transfer recording."
}
],
"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."
}
]
},
"description": "Use this API to disassociate (unlink) a user or permanently delete a user. For user-level apps, pass [the `me` value](https://marketplace.zoom.us/docs/api-reference/using-zoom-apis#mekeyword) instead of the `userId` parameter.\n\n**Deleting** a user **permanently** removes the user and their data from Zoom. Users can create a new Zoom account using the same email address. An account owner or an account admin can transfer meetings, webinars and cloud recordings to another Zoom user account before deleting.\n\n**Disassociating** a user unlinks the user from the associated Zoom account and provides the user their own basic free Zoom account. The disassociated user can then purchase their own Zoom licenses. An account owner or account admin can transfer the user's meetings, webinars, and cloud recordings to another user before disassociation.\n\n**Scopes:** `user:write:admin`, `user:write`<br>**[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Light`"
},
"response": [
{
"name": "**HTTP Status Code:** `204`<br>\nUser deleted.",
"originalRequest": {
"method": "DELETE",
"header": [
{
"description": "Added as a part of security scheme: oauth2",
"key": "Authorization",
"value": "<token>"
}
],
"url": {
"raw": "{{baseUrl}}/users/:userId?action=disassociate&transfer_email=quis officia in reprehenderit&transfer_meeting=true&transfer_webinar=true&transfer_recording=true",
"host": [
"{{baseUrl}}"
],
"path": [
"users",
":userId"
],
"query": [
{
"key": "action",
"value": "disassociate"
},
{
"key": "transfer_email",
"value": "quis officia in reprehenderit"
},
{
"key": "transfer_meeting",
"value": "true"
},
{
"key": "transfer_webinar",
"value": "true"
},
{
"key": "transfer_recording",
"value": "true"
}
],
"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."
}
]
}
},
"status": "No Content",
"code": 204,
"_postman_previewlanguage": "text",
"header": [
{
"key": "Content-Type",
"value": "text/plain"
}
],
"cookie": [
],
"body": ""
},
{
"name": "**HTTP Status Code:** `400` **Bad Request** <br><br> **Error Code:** `300`<br>The transfer-to email address cannot be the same as the unlinked or deleted user’s email address.<br> Unable to unlink API user(s).<br> This user has published events on Zoom Ev",
"originalRequest": {
"method": "DELETE",
"header": [
{
"description": "Added as a part of security scheme: oauth2",
"key": "Authorization",
"value": "<token>"
}
],
"url": {
"raw": "{{baseUrl}}/users/:userId?action=disassociate&transfer_email=quis officia in reprehenderit&transfer_meeting=true&transfer_webinar=true&transfer_recording=true",
"host": [
"{{baseUrl}}"
],
"path": [
"users",
":userId"
],
"query": [
{
"key": "action",
"value": "disassociate"
},
{
"key": "transfer_email",
"value": "quis officia in reprehenderit"
},
{
"key": "transfer_meeting",
"value": "true"
},
{
"key": "transfer_webinar",
"value": "true"
},
{
"key": "transfer_recording",
"value": "true"
}
],
"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."
}
]
}
},
"status": "Bad Request",
"code": 400,
"_postman_previewlanguage": "text",
"header": [
{
"key": "Content-Type",
"value": "text/plain"
}
],
"cookie": [
],
"body": ""
},
{
"name": "**HTTP Status Code:** `404` **Not Found**<br><br>\n**Error Code:** `1001`<br>\nUser does not exist: $userId.<br>",
"originalRequest": {
"method": "DELETE",
"header": [
{
"description": "Added as a part of security scheme: oauth2",
"key": "Authorization",
"value": "<token>"
}
],
"url": {
"raw": "{{baseUrl}}/users/:userId?action=disassociate&transfer_email=quis officia in reprehenderit&transfer_meeting=true&transfer_webinar=true&transfer_recording=true",
"host": [
"{{baseUrl}}"
],
"path": [
"users",
":userId"
],
"query": [
{
"key": "action",
"value": "disassociate"
},
{
"key": "transfer_email",
"value": "quis officia in reprehenderit"
},
{
"key": "transfer_meeting",
"value": "true"
},
{
"key": "transfer_webinar",
"value": "true"
},
{
"key": "transfer_recording",
"value": "true"
}
],
"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."
}
]
}
},
"status": "Not Found",
"code": 404,
"_postman_previewlanguage": "text",
"header": [
{
"key": "Content-Type",
"value": "text/plain"
}
],
"cookie": [
],
"body": ""
}
]
}