Click or drag to resize

AccountClientUpdateAccountPassword Method

Enables an Account holder to set the Account Password using a valid Token.
Remarks
  • Current Account Status must be Active
  • Token has an expiry of a configurable value, and must be used within this timeframe to be valid
  • New Password must adhere to the Password Rules
  • Token is supplied from Web Service Methods: Management Group Login or Management Group Authenticate
Syntax
C#
public Result UpdateAccountPassword(
	ManagementGroupRequestOfManagementGroupUpdateCredentials request
)

Parameters

request
Type: AccountServiceManagementGroupRequestOfManagementGroupUpdateCredentials

Return Value

Type: Result
Examples
C#
using (var svc = new AccountService.AccountClient())
{
  var request = new AccountService.ManagementGroupRequestOfManagementGroupUpdateCredentials();
  request.Token = "Token";//Required - Token returned from AccountService.ManagementGroupLogin
  request.ManagementGroup = "Management group";//Required - ManagementGroup supplied when calling AccountService.ManagementGroupLogin

  var credentials = new AccountService.ManagementGroupUpdateCredentials(); //Required
  credentials.AccountName = "Account name"; //Required
  credentials.ManagementGroup = "Management group";//Required
  credentials.SecurityCode = "Current password"; //Required
  credentials.NewSecurityCode = "New password"; //Required - Password must be between 8 and 20 characters long and include at least one letter and one number.

  request.Value = credentials;

  AccountService.Result result = svc.UpdateAccountPassword(request);

  if (result.FaultCode == 0)
  {
    //Request succeeded
  }
  else
  {
    //Request failed
    throw new Exception(result.FaultDescription);
  }
}
See Also