0

I'm looking for a way to validate a phone number using AWS SNS in my asp.net core app but I cannot find any resource on this matter. Can someone explain how to do this using AWS SDK for .NET ?

1 Answers1

0

as @Ermiya Eskandary suggested, more information is needed.

It sounds like you are publishing an sms text message in this example https://docs.aws.amazon.com/sns/latest/dg/example_sns_PublishTextSMS_section.html It also sounds like you are trying to validate a phone number before using psms_req.SetPhoneNumber(phone_number);

There are several methods for validating a phone number, the most simple is using regex, the second is by using a reverse lookup. AWS offers AWS PinPoint which will allow you to do a reverse lookup.

Alternatively you can use a simple regex, Regex to match all us phone number formats

AWS SDK AmazonPinpointClient.PhoneNumberValidate

Amazon SNS documentation

THE AMAZING
  • 1,496
  • 2
  • 16
  • 38