Skip to content

SNS - Phone number

0

I'm integrating an OTP code to verify a phone number that the user enters. The question is... Do I need different phone numbers to send to other countries? or does SNS automatically find a phone number for that country? I'm asking this because I found this post and Argentina only supports ShortCode

1 Answer
1

When using Amazon SNS to send SMS messages for OTP verification to different countries, you don't necessarily need different phone numbers for each country. SNS can handle sending messages to various countries using a single origination identity (like a phone number or sender ID) in many cases. However, there are some important considerations:

  1. For many countries, you can use a single origination identity to send messages globally. This is often sufficient for OTP verification purposes.

  2. Some countries have specific requirements for sender IDs or origination numbers. In these cases, you may need to register or obtain country-specific origination identities.

  3. For countries like Argentina that only support ShortCodes, you would indeed need to obtain a specific ShortCode to send messages to recipients in that country.

  4. The availability and type of origination identity (long code, short code, sender ID) can vary by country and may affect your ability to send messages.

  5. It's important to ensure you have the appropriate permissions and origination identities set up for the countries you intend to send messages to.

To ensure compliance and optimal delivery, you should:

  1. Use the E.164 number format for all phone numbers in both the 'to' and 'from' fields.
  2. Check the SMS Supported Country List provided by AWS to understand the requirements for each country you plan to send messages to.
  3. Consider using Amazon Pinpoint in addition to SNS for more advanced SMS campaign management and analytics, especially if you're sending to multiple countries.

If you're just starting out, you can use the SNS sandbox environment to test your integration. Keep in mind that in the sandbox, you're limited to sending messages only to verified destination phone numbers.

For production use, especially when sending to multiple countries, it's advisable to work with AWS support to ensure you have the correct setup for each target country, particularly for those with specific requirements like Argentina.
Sources
Amazon Simple Notification Service (SNS) FAQs | Messaging Service | AWS
SNS For Mutiple Countries for the application Hosted in Mumbai | AWS re:Post
SNS sandbox testing using multiple phone numbers | AWS re:Post

answered 2 years ago

EXPERT

reviewed 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.