Use the users API endpoint with the POST method to change a user’s password.
Warning:Check your organization’s security policies before changing a user’s password. If you want a user to change their own password, you need to expire their password. The topic Expire a User's Password Using the REST API describes how to use the API to expire a user’s password.
Prerequisites
You must have a user already configured. To create a new user, refer to the topic Create a User Account Using the REST API.
Note the User ID of the user whose password you want to change.
Base URL
https://api.prontoforms.com
Endpoint
URL structure
https://api.prontoforms.com/api/1.1/users/{userID}/password
Request parameters
None
Request header
Include the standard authorization header. This includes the username and password, where username is the API Key ID and password is the API Key Secret.
cURL example
curl -v -k -u {username}:{password} -X POST --upload-file {filename}.{extension} https://api.prontoforms.com/api/1.1/users/{UserID}/password
where username is the API Key ID and password is the API Key Secret. Supported file extensions are .xml and .json.
Request body
{
"password": "NewPassword123"
}
Note:When you change a user’s password, the system notifies the user via email. The notification email does not include the new password. You must let users know their new password.
Response code
200—OK
Response examples
This endpoint does not return a response body.
Error codes
Error code | Error message | HTTP response code | Description |
---|---|---|---|
PasswordValidationErrors | Password could not be changed. | 400 | The password does not comply with your company password policy. |
AccessDenied | Access Denied: You are not allowed to access the requested resource. | 403 | The user doesn’t exist in your team. |
ObjectNotFound | Object Not Found: The object you requested could not be found. | 404 | The system couldn’t find the user. Verify that the User ID is correct. |
Comments
0 comments
Please sign in to leave a comment.