你也可以在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'
}