Amplify-js: Invalid phone number provided/Unable to send the message. User pool does not have SMS configuration to send messages.

Created on 17 Jan 2018  路  8Comments  路  Source: aws-amplify/amplify-js

If I enable MFA on an individual user and then try to sign in I get
Invalid phone number provided/Unable to send the message. User pool does not have SMS configuration to send messages.

Even though I only want email verification and haven't selected SMS at all.

userpool

Auth Cognito Service Team help wanted pending-close-response-required

All 8 comments

@nidsharm @manueliglesias I am experiencing exactly the same - is this a bug? It certainly prevents me at the moment from using MFA.

I can comment on the same thing, I see this error:

__type | InvalidParameterException
message | Invalid phone number provided/Unable to send the message. User pool does not have SMS configuration to send messages.

when using the Auth.signIn function like:

        Auth.signIn(values.email, values.password)
            .then(user => {
                console.log(user)
                return user;
            })
            .catch(err => console.log(err));

after I manually added MFA to a user in an optionally MFA Cognito User Pool.

It could be specifically for that user, the phone number format is invalid. Check this doc:

https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-settings-attributes.html

Important

Phone numbers must follow these formatting rules: A phone number must start with a plus (+) sign, followed immediately by the country code. A phone number can only contain the + sign and digits. You must remove any other characters from a phone number, such as parentheses, spaces, or dashes (-) before submitting the value to the service. For example, a United States-based phone number must follow this format: +14325551212.

how to set phone_number country fromat to any other country then default US in AWS AMPLIFY.

Has anyone found a solution for this? I'm 99% sure the phone number on an account I am testing is correct, it passes the validation when entering it in the Cognito dashboard, but I'm still getting this error (even with the IAM role created).

Is anyone still running into this issue with the latest version of Amplify? I would like to bring this to the service team if anyone is.

Closing this issue due to no further response.

hi ,
i'm getting this error can you help me how to fix
{"__type":"InvalidParameterException","message":"Attributes did not conform to the schema: email: The attribute is required\n"}

Was this page helpful?
0 / 5 - 0 ratings