Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/317.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# Twilio..在SMS中收集数据_C#_Asp.net Mvc_Sms_Twilio - Fatal编程技术网

C# Twilio..在SMS中收集数据

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

我已经在Twilio上工作了一段时间,在电话中收集用户的输入非常舒服

但是,我需要在我的应用程序中实现一个功能,在该功能中,客户可以通过文本发送发票号并以文本形式返回状态

以下是电话呼叫的示例代码

<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
}