【发布时间】:2016-08-16 19:04:47
【问题描述】:
我正在使用 Amazon SNS 使用 .Net 应用程序传递全球 SMS 消息 我尝试使用管理员凭据直接向手机发送短信 使用此代码:
Dictionary<string, MessageAttributeValue> smsAttributes = new Dictionary<string, MessageAttributeValue>();
smsAttributes.Add("AWS.SNS.SMS.SenderID", new MessageAttributeValue() { StringValue = "mySender", DataType = "String" });//The sender ID shown on the device.
smsAttributes.Add("AWS.SNS.SMS.MaxPrice", new MessageAttributeValue() { StringValue = "0.50", DataType = "Number" });//Sets the max price to 0.50 USD.
smsAttributes.Add("AWS.SNS.SMS.SMSType", new MessageAttributeValue() { StringValue = "Transactional", DataType = "String" });//Sets the type to promotional.
PublishRequest request = new PublishRequest(){Message = message, PhoneNumber = phoneNumber,MessageAttributes = smsAttributes};
PublishResponse response = snsClient.Publish(request);
我的问题是: 我如何监控消息传递状态? 响应有消息 ID,没有成功或失败等传递状态
【问题讨论】:
标签: .net amazon-sns