C# Twilio..在SMS中收集数据
我已经在Twilio上工作了一段时间,在电话中收集用户的输入非常舒服 但是,我需要在我的应用程序中实现一个功能,在该功能中,客户可以通过文本发送发票号并以文本形式返回状态 以下是电话呼叫的示例代码C# Twilio..在SMS中收集数据,c#,asp.net-mvc,sms,twilio,C#,Asp.net Mvc,Sms,Twilio,我已经在Twilio上工作了一段时间,在电话中收集用户的输入非常舒服 但是,我需要在我的应用程序中实现一个功能,在该功能中,客户可以通过文本发送发票号并以文本形式返回状态 以下是电话呼叫的示例代码 <Response> <Gather action="Admin/CheckInvoice"> <Say> Please enter invoice number followed by # </S
<Response>
<Gather action="Admin/CheckInvoice">
<Say>
Please enter invoice number followed by #
</Say>
</Gather>
</Response>
我如何使用短信来实现同样的目标?这里是Twilio福音传道者 Twilio将webhook调用中包含的参数作为表单编码值传递给URL。因为看起来您正在使用ASP.NET MVC,所以您可以使用模型绑定来获取这些值中的任何一个 对于传入的SMS消息,您的操作方法如下所示:
public ActionResult IncomingSms(string Body) {
// Body id the name of the parameter that contains the SMS message
}
Twilio请求中包含的基本参数集列表如下:
希望有帮助
public ActionResult IncomingSms(string Body) {
// Body id the name of the parameter that contains the SMS message
}