我正在编写一个简单的程序,使用 Javascript 客户端使用 SNS 服务发送短信。
var AWS = require('aws-sdk');
var sns = new AWS.SNS({
region : 'ap-southeast-1',
accessKeyId: '',
secretAccessKey: ''
});
sns.publish({
Message : "Test message",
PhoneNumber : "Test number"
}, function (err, data) {
if(err) {
console.log("Error - " + err);
}
else {
console.log('Success - ');
console.log(data);
}
});
我成功了,数据看起来像
{ ResponseMetadata: { RequestId: '3b4e8c82-976c-55da-b1fa-dcd9ddc7254d' },
MessageId: '47a38cbe-2047-5056-a615-dce56aecc0c1' }
但是,SMS 没有发送。
可能是什么问题?
最佳答案
消息在 24 日之后开始为新请求发送。指标仪表板显示一天过时的数据。在仪表板上它正确地显示所有 SMS 交付在 9 月 21 日都失败了,尽管来自 API 的积极响应。这让我重新考虑使用 SNS 发送 SMS 的决定。
感谢所有帮助过的人。
关于node.js - 从 AWS SNS 获得成功响应但未发送 SMS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39597260/