Legacy | Change User Password

Two ways to use this API:

  • The user changes their own password. In this case, both the user-id and user parameters specify the same user id. The password specifies the old password and userPassword specifies the new password.
  • An administrator changes a user password. In this case, user and password relate to the administrator. The user-id resource specifies the user id of the user and userPassword specifies the new password. In this case, the URL should include also admin=true. If the administrator is not the user administrator of the user, the operation will fail.

In both cases, the authentication is performed with the user and password parameters.

Request syntax

Copy
https://mycloud.perfectomobile.com/services/users/<user-id>?operation=changePassword&user=value&password=value&userPassword=value[&admin=true][&optionalParameter=value] 

Parameters

Name Type Default Description
user* string
The name of the user running the operation.
password* string
The password for the user.
userPassword string
The password for the user being updated.
admin boolean false true to allow users with administrative credentials to change the password for users in their group.
responseFormat string json The response format: Either json or xml

* Mandatory parameter

Response

Name Description
status success if the operation completed successfully; otherwise failure.

Examples

This example shows the request for updating the password 1234 for user JohnSmith, to abcd.

Copy

Request

https://mycloud.perfectomobile.com/services/users/JohnSmith?operation=changePassword&user=JohnSmith&password=1234&userPassword=abcd

This example shows the request for updating the password for user JohnSmith by admin user, to abcd.

Copy

Request

https://mycloud.perfectomobile.com/services/users/JohnSmith?operation=changePassword&user=adminUser&password=adminPassword&userPassword=abcd&admin=true