使用AWS SNS的印度号码无法发送短信

问题描述 投票:0回答:1

你也可以在AWS线程上找到这个。AWS开发者论坛。印度电话号码上没有发送短信......。

var sns = new AWS.SNS({ "region": "ap-south-1" }); 

var params = {
        Message: 'this is a test message',
        PhoneNumber: '+91xxx'
      };
sns.setSMSAttributes({
        attributes: {
            DefaultSMSType: 'Transactional'
        }
});
sns.publish(params, function(err, data) {
        if (err) console.log(err, err.stack); // an error occurred
        else     console.log("success "+JSON.stringify(data)); // successful response
 });

我得到了消息ID的回复,但短信一直没有发送。

{
  ResponseMetadata: { RequestId: '1d6dd652-fd57-5f7d-ad7f-XXXXX' },
  MessageId: '431efd91-7356-5e8e-9384-XXXX' 
}
amazon-web-services amazon-sns aws-pinpoint
1个回答
1
投票

在研究过程中,我发现我之前在控制台中没有将 "默认消息类型 "选择为Transactional(见图)。一旦我选择了Transactional,我就开始接收短信了。

enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.