问题
I am trying with this sample code to send message using SNS API -
BasicAWSCredentials cr = new BasicAWSCredentials("MYACCESSKEYS","mySecretKeys");
AmazonSimpleNotificationService sns = new AmazonSimpleNotificationServiceClient(cr);
string topicArn = sns.CreateTopic(new CreateTopicRequest
{
Name = "ses-bounces-topic",
}).CreateTopicResult.TopicArn;
sns.SetTopicAttributes(new SetTopicAttributesRequest
{
TopicArn = topicArn,
AttributeName = "MyName",
AttributeValue = "Sample Notifications"
});
sns.Subscribe(new SubscribeRequest
{
TopicArn = topicArn,
Protocol = "SMS",
Endpoint = "my-mobile-number"
});
ListSubscriptionsByTopicResult ls = sns.ListSubscriptionsByTopic(new ListSubscriptionsByTopicRequest
{
TopicArn = topicArn
}).ListSubscriptionsByTopicResult;
sns.Publish(new PublishRequest {
TopicArn=topicArn,
Subject="MySms",
Message="Testing Message"
});
This code working fine to send message to my mobile. I am successful to send message to a SMS-enabled device mobile.
Is there any way to get reply of user if he/she sent back? Please guide me if we can get the reply of user sent back using any API request.
Thanks in advance!!
回答1:
You cannot currently receive replies to SMS messages with Amazon SNS. We would like to provide expanded SMS support (more AWS regions, more geographic coverage, more functionality), but unfortunately don’t have timing to share.
回答2:
As @Rohan explained AWS cannot receive the SMS. You will have to look for some third party solution like:
- Twilio SMS - Build SMS Text Messaging Into Your Web Apps | Twilio : http://www.twilio.com/sms
- Send & Receive SMS using the best SMS API there is. : http://www.sent.ly/
Disclaimer - I havent tried them myself. Just giving you a direction to explore! Post here if you find it useful.
来源:https://stackoverflow.com/questions/22143366/how-can-i-get-the-reply-of-sms-that-sent-to-a-mobile-device