I am currently successfully able to send an SMS to my Twilio number which I got with my account and reply to it with a standard response.
What I want is to parse the received text in my Twilio number and paste it int a .txt file.
Here the code for Receiving an SMS and replying to it.
using Twilio.TwiML;
using Twilio.AspNet.Common;
using Twilio.AspNet.Mvc;
namespace Twilio.Controllers
{
public class SmsController : TwilioController
{
public TwiMLResult Index(SmsRequest incomingMessage)
{
var messagingResponse = new MessagingResponse();
messagingResponse.Message("The copy cat says: " +
incomingMessage.Body);
Console.WriteLine(incomingMessage.Body);
return TwiML(messagingResponse);
}
}
}
Also, How can i use it inside a windows service? I am new to this and having searched a lot for a quite sometime, seeking some help or direction