使用boto3设置默认的自定义AWS SNS发件人ID

时间:2019-04-29 10:39:05

标签: python django django-rest-framework boto3 boto

我发现,要设置自定义AWS SNS Sender发件人ID,我们可以在发送SMS时直接进行设置。

response = AWS_SNS_CLIENT.publish(
PhoneNumber=mobile_number,
Message='OTP to login into your account',
Subject='One Time Password',
MessageAttributes={
    'AWS.SNS.SMS.SenderID': {
    'DataType': 'String',
    'StringValue': sender_name
    }
}

我想知道默认情况下是否有任何方法可以设置发件人ID,而不是每次发送SMS时都要提及它。

0 个答案:

没有答案