0

I'm using AWS AmazonSimpleNotificationServiceClient (AWS SDK for .NET) to send an SMS according to their documentation at https://docs.aws.amazon.com/sns/latest/dg/sms_publish-to-phone.html#sms_publish_sdk

Presently the messages send/receive beautifully, with this exception:

In my AWS Pinpoint account, I have two long codes. (for example, lets say: +1 (111) 111-1111 and +1 (999) 999-9999). AWS seems to arbitrarily decide which long code to use as the "Sender ID". I am specifying the long code in the publish request like this:

pubRequest.MessageAttributes["AWS.SNS.SMS.SenderID"] = 
    new MessageAttributeValue{ StringValue = "11111111111", DataType = "String"};

The expected result is that the recipient will receive the message from +1 (111) 111-1111 however, in many cases, the recipient actually receives the message from +1 (999) 999-9999.

How can make sure that these SMS messages use the long code that I specify?

Thanks!

John Rotenstein
  • 241,921
  • 22
  • 380
  • 470
  • Just checking: are you sending to a [country that suppports sender IDs](https://docs.aws.amazon.com/sns/latest/dg/sms_supported-countries.html)? – Michael - sqlbot Feb 19 '19 at 22:14
  • 1
    I'm sending to USA. I understand USA does not support (alpha) sender ID such as "My Sender ID" (which is irrelevant in my case) but AWS documentations is vague on long codes. Whatever the case, when we receive the messages (USA recipients) our AWS long codes show up as the "Sender", it's just a matter of getting it to use a specific one. – Brian Morgan Feb 19 '19 at 23:27
  • Docs are indeed quite vague on long codes, but `AWS.SNS.SMS.SenderID` says it requires [at least one letter](https://docs.aws.amazon.com/sns/latest/dg/sms_publish-to-phone.html#sms_publish_sdk) so either that statement is incorrect, or the long code is specified in a different way that doesn't seem to be mentioned. I assume you have tried omitting the leading "1" and providing exactly the 10 digits? In your code example, you have provided what looks like 11 digits. – Michael - sqlbot Feb 20 '19 at 00:40
  • yes, I've attempted many variations of the long code in the "SenderID". It does not "require" at least one alphabetic character (at least it doesn't error out), however it will error if a non alphanumeric character is used (i.e. a hyphen or plus sign). I've even tried incorrect long codes (long codes not in my pool) or random alphanumeric strings and in such cases it behaves the same as I describe above - it seems like AWS completely disregards this attribute and just sends from whichever long code it feels like. – Brian Morgan Feb 20 '19 at 18:54
  • @BrianMorgan, is this issue solved ? I have similar kind of problem here can any body look into it https://stackoverflow.com/questions/56316513/aws-pinpoint-two-way-sms-is-not-triggering-sns-for-incoming-sms – Naroju May 26 '19 at 19:03
  • AWS has finally made some updates to their Pinpoint service (and documentation) and uses a different sdk toolset and it works as intended. – Brian Morgan Jan 28 '20 at 22:48

0 Answers0