namecheap.users.changePassword
This API call works in two ways depending on the parameters that are
sent.The first way is sending the global parameter username along with
the oldpassword and newpassword. The next way is using Resetcode
obtained with namecheap.users.resetpassword API
FIRST WAY:
Request Parameters
Global parameters are not shown here for clarity, but should be present in all requests
| Name | Type | MaxLength | Required? | Default | Description |
| OldPassword | String | 20 | Yes | | Old password of the user |
| NewPassword | String | 20 | Yes | | New password of the user |
Example Request
https://api.namecheap.com/xml.response?ApiUser=apiexample&ApiKey=56b4c87ef4fd49cb96d915c0db68194&
UserName=apiexample&Command=namecheap.users.changepassword&ClientIp=192.168.1.109&
OldPassword=NCpass09&NewPassword=NCpass~9
Example Response
<?xml version="1.0" encoding="utf-8"?>
<ApiResponse Status="OK" xmlns="http://api.namecheap.com/xml.response">
<Errors/>
<RequestedCommand>namecheap.users.changePassword</RequestedCommand>
<CommandResponse Type="namecheap.users.changePassword">
<UserChangePasswordResult Success="true" UserId="123" />
</CommandResponse>
<Server>SERVER-NAME</Server>
<GMTTimeDifference>+5</GMTTimeDifference>
<ExecutionTime>0.024</ExecutionTime>
</ApiResponse>
Error Codes
Specifies the error codes that might be returned from this method
| Number | Description |
| 2010302 | OldPassword is missing |
| 4022335 | Unable to change password |
| 5050900 | Unhandled exceptions |
SECOND WAY
Global parameter - UserName should be omitted for this API call.All other
Global parameters must be included.
| Name | Type | MaxLength | Required? | Default | Description |
| ResetCode | String | 50 | Yes | | The password reset code you get after calling namecheap.users.resetpassword API
|
| NewPassword | String | 20 | Yes | | New password of the user |
Example Request
http://api.namecheap.com/xml.response?APIUser=apiexample&ApiKey=56b4c87ef4fd49cb96d915c0db68194&
clientip=61.11.95.68&command=namecheap.users.changepassword&
resetcode=zd8e256727d1e4c8563e014a16c1054cc&newpassword=password2
Example Response
<?xml version="1.0" encoding="utf-8"?>
<ApiResponse Status="OK">
<Errors/>
<RequestedCommand>namecheap.users.changePassword</RequestedCommand>
<CommandResponse Type="namecheap.users.changePassword">
<UserChangePasswordResult Success="true" UserId="392"/>
</CommandResponse>
<Server>SERVER159</Server>
<GMTTimeDifference>--5:00</GMTTimeDifference>
<ExecutionTime>0.14</ExecutionTime>
</ApiResponse>
| Number | Description |
| 2015103 | Cannot change UserName and ResetCode at a time |
| 2010302 | OldPassword is missing |
| 2010103 | UserName is missing |
| 2010303 | ResetCode is missing |
| 4011331 | Invalid status |
| 4022335 | Unable to change password |
| 5050900 | Unhandled exceptions |