gpt4 book ai didi

amazon-web-services - Amazon SNS -- 更改发件人 ID

转载 作者:行者123 更新时间:2023-12-04 08:04:56 26 4
gpt4 key购买 nike

我想使用 Amazon SNS 服务向几个号码发送 SMS。我有一个每天运行一次的 cronjob,应该向当时到期的号码发送短信。

现在我有几个关于 SNS 的问题。

  • 我是否在每次运行我的 cronjob 时创建一个主题,订阅它的数字,发送它,然后删除它?或者我只是在控制台中创建一个主题,然后我只是订阅号码,发送消息并在发送后再次取消订阅号码?
  • 此外,我尝试了一些简单的方法来提供我的 ARN,并发送一条内容为“Hello World!”的消息。在我的手机上收到的消息来自“通知”,内容如下:

    FPREMINDER> 世界你好!

  • 现在我有两个问题:
  • FPREMINDER 是我的主题的显示名称。但为什么它包含在消息中?
  • 如果有人回复,我如何将“通知”更改为自定义名称和自定义编号?

  • 谢谢你的帮助!

    最佳答案

    如果您始终向同一组收件人发送消息,那么逻辑过程将是定义一次主题,添加订阅者,然后每天简单地将消息发送到该主题。

    如果您希望维护自己的订阅者列表,人们可以全天在其中添加/删除自己,然后使用 Amazon SNS 的功能,让您无需订阅即可直接发送 SMS 消息。

    来自 Setting SMS Messaging Preferences :

    For Default 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. For example, messages delivered to U.S. phone numbers will not display the sender ID. For the countries 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. For countries that require an alphabetic sender ID, the message displays NOTICE as the sender ID.

    You can override the this setting when you send a message.



    来自 Sending an SMS Message :

    When you send a message, you can control whether the message is optimized for cost or reliable delivery, and you can specify a sender ID. ...

    AWS.SNS.SMS.SenderID

    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. For example, messages delivered to U.S. phone numbers will not display the sender ID. For the countries 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. For countries that require an alphabetic sender ID, the message displays NOTICE as the sender ID.

    This message-level attribute overrides the account-level attribute DefaultSenderID, which you set by using the SetSMSAttributes request.

    关于amazon-web-services - Amazon SNS -- 更改发件人 ID,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47415798/

    26 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com