Not able to send sms(Text messages) through api to USA region using csharp dotnet


We are actually trying to send sms(text messages) to US destination{.AmazonSimpleNotificationServiceClient}. from oregon region (Us west-2), in api call its showing successful but in aws console it shows failed. But we are able to send sms to mobile form mumbai region (APSouth) region using same api service. so all i got to know is we need an Origination ID to send sms txt messages to US destination. while requesting in excess limit it show only 10dlc option but not short codes. So even while creating an origination ID also i am facing issue. I have increased the usage limit in oregon region also. Below is the code i am using in api

AmazonSimpleNotificationServiceClient snsClient = new AmazonSimpleNotificationServiceClient("access key", "secret key", Amazon.RegionEndpoint.USWest2); PublishRequest pubRequest = new PublishRequest(); // pubRequest.Message = message+ " is the OTP for your multi factor authentication.This code will expire in 10 minutes."; pubRequest.Message = message; pubRequest.PhoneNumber = mobileNo; // add optional MessageAttributes, for example: ////pubRequest.MessageAttributes.Add("AWS.SNS.SMS.SenderID", new MessageAttributeValue ////{ StringValue = "clicinsight", DataType = "String" }); // pubRequest.MessageAttributes AWS.SNS.SMS.SenderID"] = new MessageAttributeValue { StringValue = "...", DataType = "String" }; //pubRequest.MessageAttributes AWS.SNS.SMS.MaxPrice"] = // new MessageAttributeValue { StringValue = "0.50", DataType = "Number" }; pubRequest.MessageAttributes AWS.SNS.SMS.SMSType"] = new MessageAttributeValue { StringValue = "Transactional", DataType = "String" }; PublishResponse pubResponse = snsClient.Publish(pubRequest);

1 Answer


I can confirm that your code doesn't have problem and the issue you are facing relates to the breaking changes introduced by US telecom providers : "US telecom providers no longer support using person-to-person (P2P) long codes for application-to-person (A2P) communications to US destinations"

You need to use one of the following types of origination numbers in-order to send SMS messages US recipients:

  1. 10DLC
  2. Toll-free Numbers
  3. short Code

I would recommend re-viewing each of the above origination numbers and its associated charged/costs and see if it fits your use-case and then you can proceed to request the appropriate one.

Should you have any follow-up questions related to this reported issue feel free to let us know by clicking the comment button.

answered 3 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.

Guidelines for Answering Questions