unicodeC / Zoom API / Update a user's password
Back to Collection Items
#include <C_CkHttpW.h>
#include <C_CkHttpRequestW.h>
#include <C_CkHttpResponseW.h>
void ChilkatSample(void)
{
HCkHttpW http;
BOOL success;
HCkHttpRequestW req;
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();
req = CkHttpRequestW_Create();
CkHttpRequestW_putHttpVerb(req,L"PUT");
CkHttpRequestW_putPath(req,L"/v2/users/:userId/password");
CkHttpRequestW_putContentType(req,L"multipart/form-data");
CkHttpRequestW_AddParam(req,L"password",L"dolor Excepteur minim");
CkHttpRequestW_AddHeader(req,L"Authorization",L"Bearer <access_token>");
resp = CkHttpW_SynchronousRequest(http,L"api.zoom.us",443,TRUE,req);
if (CkHttpW_getLastMethodSuccess(http) == FALSE) {
wprintf(L"%s\n",CkHttpW_lastErrorText(http));
CkHttpW_Dispose(http);
CkHttpRequestW_Dispose(req);
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);
CkHttpRequestW_Dispose(req);
return;
}
CkHttpResponseW_Dispose(resp);
wprintf(L"Success.\n");
CkHttpW_Dispose(http);
CkHttpRequestW_Dispose(req);
}
Curl Command
curl -X PUT
-H "Authorization: Bearer <access_token>"
-H "Content-Type: multipart/form-data"
--form 'password=dolor Excepteur minim'
https://api.zoom.us/v2/users/:userId/password
Postman Collection Item JSON
{
"name": "Update a user's password",
"request": {
"method": "PUT",
"header": [
{
"key": "Content-Type",
"value": "multipart/form-data"
}
],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "password",
"value": "dolor Excepteur minim",
"description": "(Required) User password. Should be less than 32 characters.\n\n**Note:** If the account owner or admin has enabled [enhanced password requirements](https://support.zoom.us/hc/en-us/articles/360034675592-Advanced-security-settings#h_fa9186e4-6818-4f7a-915c-2e25c19f0acd), the value provided in this field must meet those requirements. These requirements can be retrieved by calling the [Get Account Settings API](https://marketplace.zoom.us/docs/api-reference/zoom-api/accounts/accountsettings) and referring to the `password_requirement` field present in the `security` object.",
"type": "text"
}
]
},
"url": {
"raw": "{{baseUrl}}/users/:userId/password",
"host": [
"{{baseUrl}}"
],
"path": [
"users",
":userId",
"password"
],
"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": "Update the [password](https://support.zoom.us/hc/en-us/articles/206344385-Change-a-User-s-Password) of a user using which the user can login to Zoom. 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\nAfter this request is processed successfully, an email notification will be sent to the user stating that the password was changed.<br>\n**Scopes:** `user:write:admin` `user:write`<br>\n \n **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Medium`\n**Prerequisites:**<br>\n* Owner or admin of the Zoom account."
},
"response": [
{
"name": "**HTTP Status Code:** `204` **OK**<br>\nPassword updated.",
"originalRequest": {
"method": "PUT",
"header": [
{
"description": "Added as a part of security scheme: oauth2",
"key": "Authorization",
"value": "<token>"
}
],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "password",
"value": "dolor Excepteur minim",
"description": "(Required) User password. Should be less than 32 characters.\n\n**Note:** If the account owner or admin has enabled [enhanced password requirements](https://support.zoom.us/hc/en-us/articles/360034675592-Advanced-security-settings#h_fa9186e4-6818-4f7a-915c-2e25c19f0acd), the value provided in this field must meet those requirements. These requirements can be retrieved by calling the [Get Account Settings API](https://marketplace.zoom.us/docs/api-reference/zoom-api/accounts/accountsettings) and referring to the `password_requirement` field present in the `security` object.",
"type": "text"
}
]
},
"url": {
"raw": "{{baseUrl}}/users/:userId/password",
"host": [
"{{baseUrl}}"
],
"path": [
"users",
":userId",
"password"
],
"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>Your new password can not match the old password.<br>This password cannot be changed because it has already been changed the maximum number of times over the past 24 hours.<br>",
"originalRequest": {
"method": "PUT",
"header": [
{
"description": "Added as a part of security scheme: oauth2",
"key": "Authorization",
"value": "<token>"
}
],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "password",
"value": "dolor Excepteur minim",
"description": "(Required) User password. Should be less than 32 characters.\n\n**Note:** If the account owner or admin has enabled [enhanced password requirements](https://support.zoom.us/hc/en-us/articles/360034675592-Advanced-security-settings#h_fa9186e4-6818-4f7a-915c-2e25c19f0acd), the value provided in this field must meet those requirements. These requirements can be retrieved by calling the [Get Account Settings API](https://marketplace.zoom.us/docs/api-reference/zoom-api/accounts/accountsettings) and referring to the `password_requirement` field present in the `security` object.",
"type": "text"
}
]
},
"url": {
"raw": "{{baseUrl}}/users/:userId/password",
"host": [
"{{baseUrl}}"
],
"path": [
"users",
":userId",
"password"
],
"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.\n",
"originalRequest": {
"method": "PUT",
"header": [
{
"description": "Added as a part of security scheme: oauth2",
"key": "Authorization",
"value": "<token>"
}
],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "password",
"value": "dolor Excepteur minim",
"description": "(Required) User password. Should be less than 32 characters.\n\n**Note:** If the account owner or admin has enabled [enhanced password requirements](https://support.zoom.us/hc/en-us/articles/360034675592-Advanced-security-settings#h_fa9186e4-6818-4f7a-915c-2e25c19f0acd), the value provided in this field must meet those requirements. These requirements can be retrieved by calling the [Get Account Settings API](https://marketplace.zoom.us/docs/api-reference/zoom-api/accounts/accountsettings) and referring to the `password_requirement` field present in the `security` object.",
"type": "text"
}
]
},
"url": {
"raw": "{{baseUrl}}/users/:userId/password",
"host": [
"{{baseUrl}}"
],
"path": [
"users",
":userId",
"password"
],
"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": ""
}
]
}