gpt4 book ai didi

c# - 如何获取发送到移动设备的短信的回复?

转载 作者:行者123 更新时间:2023-11-30 14:10:51 25 4
gpt4 key购买 nike

我正在尝试使用此示例代码使用 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"
});

此代码可以很好地向我的手机发送消息。我已成功将消息发送到支持 SMS 的移动设备。

如果他/她发回,有没有办法得到用户的回复?如果我们可以使用任何 API 请求返回用户的回复,请指导我。

提前致谢!

最佳答案

您目前无法使用 Amazon SNS 接收对 SMS 消息的回复。我们希望提供扩展的 SMS 支持(更多 AWS 区域、更多地理覆盖范围、更多功能),但遗憾的是没有时间分享。

关于c# - 如何获取发送到移动设备的短信的回复?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22143366/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com