1

I'm using AWS SNS in order to send SMS to specific phone using the code below, every thing is working like a charm but I have one problem- the sender/message title is "NOTICE" and I wish to change it value. I didn't find any attribute that I can edit within the boto API to solve this issue...

Any ideas ?? THANKS!!!

import boto3
sns = boto3.client('sns')
sns.publish(
    PhoneNumber = '+11234567890',
    Message = 'Simple text message'
)
1
  • Did you check the answer? Does it work? Commented Nov 27, 2018 at 19:10

1 Answer 1

2

In order to change the NOTICE you will need to set the SenderID:

sns.set_sms_attributes(attributes={"DefaultSenderID": "Me"})

This is the information from the docs:

(Optional) For Sender ID, type a custom ID that contains up to 11 alphanumeric characters, including at least one letter and no spaces. The sender ID is displayed as the message sender on the receiving device. For example, you can use your business brand to make the message source easier to recognize.

Support for sender IDs varies by country and/or region. For example, messages delivered to U.S. phone numbers will not display the sender ID. For the countries and regions that support sender IDs, see Supported Regions and Countries.

If you do not specify a sender ID, the message will display a long code as the sender ID in supported countries or regions. For countries and regions that require an alphabetic sender ID, the message displays NOTICE as the sender ID.

This message-level sender ID overrides your default sender ID, which you set on the Text messaging preferences page.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks, I eventually set it in AWS console (instead in the code itself)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.