AWS Cognito Android - verifyAttribute api调用的内部错误

时间:2017-08-16 11:07:02

标签: android aws-sdk amazon-cognito

我已经在compile 'com.amazonaws:aws-android-sdk-cognitoidentityprovider:2.4.6'

的帮助下成功地在AWS app中集成了AWS Cognito功能

SignUp和Login功能正常运行,但当我尝试验证phone_number属性时,它会提供Internal error

我做了什么

第1步:获取phone_number属性

的验证码
user.getAttributeVerificationCodeInBackground("phone_number", new VerificationHandler() {
            @Override
            public void onSuccess(CognitoUserCodeDeliveryDetails verificationCodeDeliveryMedium) {

            }

            @Override
            public void onFailure(Exception exception) {
                LogHelper.printErrorLog(dataManager.formatException(exception));
            }
        });

我将手机中的验证码作为带有6位数代码的短信获取。

第2步:提交验证码

user.verifyAttribute("phone_number", verificationCode, new GenericHandler() {
            @Override
            public void onSuccess() {

            }
            @Override
            public void onFailure(Exception exception) {
                LogHelper.printErrorLog(dataManager.formatException(exception));
                // here i am getting Internal Error
            }
        });

更新

AWS Request ID:c41d7648-8891-11e7-9fa1-7762eecd6b9a

地区:N.Virginia(US East-1)

enter image description here

0 个答案:

没有答案