Android


12. Change Password

You can change your existing password with your new password in Goodie system using this function.

Here is the example code:

Goodie.setChangePassword(authToken, deviceUniqueId, memberId, merchantId, 
    newPassword, confirmPassword, oldPassword, userName)
    .changePasswordGoodie(this, new SetChangePasswordListener() {
        
        @Override
        public void onSuccess(ChangePasswordResponse resp) {

        if (resp.getAbstractResponse().getResponseStatus().equals("MEM902")) 
            {

            // On Success


            } 

        }


        @Override
        public void onError(Throwable throwable) {

            // On Failure

        }

});
                    

Where :
Param Type Description
authToken String authToken is used as for header authentication purpose
deviceUniqueId String deviceUniqueId is identify android device
memberId String memberId is identifier that will be used to identity a member
merchantId String merchantId is identifier that will be used to identity a merchant
newPassword String Fill this with your new password
confirmPassword String Confirm your new password (it must similar with your newpassword)
oldPassword String Fill with your existing password to make sure that was you
userName String Fill this parameter with your username (email address)

Response Change Password :
{
                    
    "abstractResponse": 

    {

        "responseStatus": "MEM902",
        "responseMessage": "Password has been change"

    }

}