Skip to content

Instantly share code, notes, and snippets.

@dchanTwilio
dchanTwilio / Message Response Demo
Created February 20, 2014 22:22
Responding to incoming messages
using System.Web.Mvc;
using Twilio;
using Twilio.TwiML;
using Twilio.TwiML.Mvc;
namespace MessageResponseDemo.Controllers
{
public class MessageController : TwilioController
{
public ActionResult Incoming()
@dchanTwilio
dchanTwilio / Outbound Twilio Sms C#
Created February 20, 2014 23:09
C#: Send an outbound message using the Twilio Rest API
using System.Web.Mvc;
using Twilio;
namespace MessageDemo.Controllers
{
public class MessageController : TwilioController
{
public void Outgoing()
{
var twilioRestClient = new TwilioRestClient("{{Insert AccountSid}}", "{{Insert AuthToken}}");
<%@ Page Language="C#" %>
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
Response.ContentType = "text/xml";
}
</script>
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Dial>
@dchanTwilio
dchanTwilio / DialExampleController.cs
Last active August 29, 2015 14:02
Csharp Dial with dial attributes
using Twilio.TwiML;
using Twilio.TwiML.Mvc;
namespace Demo.Controllers
{
public class DialExampleController : TwilioController
{
public ActionResult Dial()
{
var response = new TwilioResponse();
@dchanTwilio
dchanTwilio / MessageController.cs
Created July 10, 2014 00:48
Responding to texts in separate thread
using System.Threading;
using System.Web.Mvc;
using Twilio;
using Twilio.TwiML;
using Twilio.TwiML.Mvc;
namespace MultithreadedSendDemo.Controllers
{
public class MessageController : TwilioController
{