blackjack
blackjack

Reputation: 1131

How to change phone_number format upon creation of a AWS Cognito User Pool?

I'm creating a new Cognito User Pool in AWS. One of user attributes is phone number. User Pool documentation states that phone number format must start with a plus sign (+), something like "+14325551212" for United States. But what about other countries formats. I've tried with Brazilian format and got the following error: "Invalid phone number format". So, do only US numbers allowed ?

Upvotes: 8

Views: 8308

Answers (3)

Pablo Sanchez
Pablo Sanchez

Reputation: 1

Brasil is +55. :-/ the + = 00. If you want "Brazilian numbers" then it would be like

+55 61 999998888

Upvotes: 0

Ionut Trestian
Ionut Trestian

Reputation: 5751

I am on the Cognito team and we recently deployed a fix that should take care of this issue. So those phone numbers should work now.

Upvotes: 8

Ionut Trestian
Ionut Trestian

Reputation: 5751

Cognito uses SNS to send SMS messages so all the countries in the list below should be supported (Brazil is in the list):

http://docs.aws.amazon.com/sns/latest/dg/sms_supported-countries.html

AWS strongly encourages E.164 number formatting for all phone numbers both in the ‘to’ and ‘from’ (when applicable) fields. I'm not really familiar with Brazilian numbers, is there anything particular about that specific one?

Upvotes: 2

Related Questions