0

我正在使用 Nexmo 验证 SDK 来验证用户的电话号码。我可以获取给定电话号码的密码,但是当我输入正确的密码并调用 checkPinCode 方法时,我收到 INVALID_CREDENTIALS 错误。这就是实现。

//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();
        }
    });

非常感谢帮助。提前致谢

4

0 回答 0