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

0

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개 답변
1

Hello,

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.

AWS
syumaK
답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠