I'm using Nexmo Verify SDK to verify the phone number of the user. I am able to get the pin to the given phone number but when i enter the correct pin code and call checkPinCode method i get INVALID_CREDENTIALS error. This is the implementation.
//This is how i collected the phone number
final String phone = phoneNumber.getText().toString();
verifyClient.getVerifiedUser("LK",phone );
//This is how i collected the pin number
final String pin = pinNumberEditText.getText().toString();
verifyClient.checkPinCode(pin);
verifyClient.addVerifyListener(new VerifyClientListener() {
@Override
public void onVerifyInProgress(VerifyClient verifyClient, UserObject user) {
Toast.makeText(MainActivity.this, "Verifying", Toast.LENGTH_LONG).show();
}
@Override
public void onUserVerified(VerifyClient verifyClient, UserObject user) {
Toast.makeText(MainActivity.this, "Successfully Verified", Toast.LENGTH_LONG).show();
}
@Override
public void onError(VerifyClient verifyClient, com.nexmo.sdk.verify.event.VerifyError errorCode, UserObject user) {
Toast.makeText(MainActivity.this, "Error"+errorCode+user.getPhoneNumber(), Toast.LENGTH_LONG).show();
}
@Override
public void onException(IOException exception) {
Toast.makeText(MainActivity.this, "Exception", Toast.LENGTH_LONG).show();
}
});
Help much appreciated. Thanks in advance