Newer Version Available
resetPassword()
Syntax
Usage
Use resetPassword() to request that the API change the password of a User or SelfServiceUser, and return a system-generated password string of random letters and numbers. Use setPassword() instead if you want to set the password to a specific value.
Your client application must be logged in with sufficient access rights to change the password for the specified user. For more information, see Factors that Affect Data Access.
For information on IDs, see ID Field Type.
Sample Code—Java
This sample resets the password for the user specified by the userId parameter. It calls resetPassword() with this ID and gets the temporary password from the call result. It writes this temporary password to the console and returns it.
Sample Code—C#
This sample resets the password for the user specified by the userId parameter. It calls resetPassword() with this ID and gets the temporary password from the call result. It writes this temporary password to the console and returns it.
Arguments
| Name | Type | Description |
|---|---|---|
| userID | ID | ID of the User or SelfServiceUser whose password you want to reset. For information on IDs, see ID Field Type. |
Response
| Name | Type | Description |
|---|---|---|
| password | string | New password generated by the API. When the user logs in with this password, they’re asked to provide a new password. This password is temporary, meaning that it cannot be reused after the user has set their new password. |