unicodeC / Zoom API / Delete a user's profile picture
Back to Collection Items
#include <C_CkHttpW.h>
#include <C_CkHttpResponseW.h>
void ChilkatSample(void)
{
HCkHttpW http;
BOOL success;
HCkHttpResponseW resp;
int respStatusCode;
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
http = CkHttpW_Create();
// Adds the "Authorization: Bearer <access_token>" header.
CkHttpW_putAuthToken(http,L"<access_token>");
resp = CkHttpW_QuickRequest(http,L"DELETE",L"https://api.zoom.us/v2/users/:userId/picture");
if (CkHttpW_getLastMethodSuccess(http) == FALSE) {
wprintf(L"%s\n",CkHttpW_lastErrorText(http));
CkHttpW_Dispose(http);
return;
}
respStatusCode = CkHttpResponseW_getStatusCode(resp);
wprintf(L"Response Status Code = %d\n",respStatusCode);
if (respStatusCode != 204) {
wprintf(L"Response Header:\n");
wprintf(L"%s\n",CkHttpResponseW_header(resp));
wprintf(L"Response Body:\n");
wprintf(L"%s\n",CkHttpResponseW_bodyStr(resp));
wprintf(L"Failed.\n");
CkHttpResponseW_Dispose(resp);
CkHttpW_Dispose(http);
return;
}
CkHttpResponseW_Dispose(resp);
wprintf(L"Success.\n");
CkHttpW_Dispose(http);
}
Curl Command
curl -X DELETE
-H "Authorization: Bearer <access_token>"
https://api.zoom.us/v2/users/:userId/picture
Postman Collection Item JSON
{
"name": "Delete a user's profile picture",
"request": {
"method": "DELETE",
"header": [
],
"url": {
"raw": "{{baseUrl}}/users/:userId/picture",
"host": [
"{{baseUrl}}"
],
"path": [
"users",
":userId",
"picture"
],
"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 delete a user's profile picture. 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**Scopes:** `user:write:admin`, `user:write` <br> **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Medium`"
},
"response": [
{
"name": "**HTTP Status Code:** `204`<br>\nNo Content<br>\nUser picture deleted.",
"originalRequest": {
"method": "DELETE",
"header": [
{
"description": "Added as a part of security scheme: oauth2",
"key": "Authorization",
"value": "<token>"
}
],
"url": {
"raw": "{{baseUrl}}/users/:userId/picture",
"host": [
"{{baseUrl}}"
],
"path": [
"users",
":userId",
"picture"
],
"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`<br>\nBad request<br><br>\n**Error Code:** `200`<br>\nOnly an account administrator can change a profile picture.<br>",
"originalRequest": {
"method": "DELETE",
"header": [
{
"description": "Added as a part of security scheme: oauth2",
"key": "Authorization",
"value": "<token>"
}
],
"url": {
"raw": "{{baseUrl}}/users/:userId/picture",
"host": [
"{{baseUrl}}"
],
"path": [
"users",
":userId",
"picture"
],
"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`<br>\nNot Found<br><br>\n**Error Code:** `1001`<br>\nUser does not exist: $userId.\n",
"originalRequest": {
"method": "DELETE",
"header": [
{
"description": "Added as a part of security scheme: oauth2",
"key": "Authorization",
"value": "<token>"
}
],
"url": {
"raw": "{{baseUrl}}/users/:userId/picture",
"host": [
"{{baseUrl}}"
],
"path": [
"users",
":userId",
"picture"
],
"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": ""
}
]
}