Reputation: 429
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'
)
Upvotes: 1
Views: 1002
Reputation: 62636
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.
Upvotes: 2