Madhawa
Madhawa

Reputation: 154

AWS SNS verification text messages not deliver to mobile phones

Steps:

1). Created a new sandbox account and verified mobile number. (verification messages were delivered)

2). Changed cognito settings enter image description here

3). following code used for get a verification message (lambda)

    await cognitoidentityserviceprovider.getUserAttributeVerificationCode({{
          AccessToken: access,
          AttributeName: 'phone_number',
        }}).promise()

4). Used aws appsync for sending request

5). returned following message

    {
  "data": {
    "requestMobilePasscode": "{CodeDeliveryDetails={Destination=+**********, DeliveryMedium=SMS, AttributeName=phone_number}}"
  }
}

6). And used us-east-1 region.

7). checked amazon SNS -> Text messaging (SMS) -> Delivery statistics (UTC), All messages are sending failed.

Does anyone have any idea about this issue thanks

Upvotes: 0

Views: 957

Answers (1)

bjrnt
bjrnt

Reputation: 2822

You should get a detailed error message for any SMS delivery failures if you enable delivery status logging. Detailed instructions can be found here: https://docs.aws.amazon.com/sns/latest/dg/sms_stats_cloudwatch.html#sns-viewing-cloudwatch-logs.

Upvotes: 1

Related Questions