<%
' Replace with your account's settings available in the Dashboard:
accountSID = "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
authToken = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
' Setup the URL:
baseUrl = "https://api.twilio.com"
smsUrl = baseUrl & "/2008-08-01/Accounts/" & accountSid & "/SMS/Messages"
' Ssetup the request and authorization:
Set objHTTP = Server.CreateObject("MSXML2.ServerXMLHTTP")
objHTTP.Open "POST", smsUrl, False, accountSid, authToken
objHTTP.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
' Message parameters:
From = "your-number-here" ' The number to send the message from
Recipient = "recipient-number-here" ' The number to send the message to
Body = "Sending SMS is easy with Twilio!" ' Message contents
postData = "From =" & Server.URLEncode(from)
postData = postData & "&To =" & Server.URLEncode(Recipient)
postData = postData & "&Body =" & Server.URLEncode(Body)
' Send the POST data:
objHTTP.send postData
' Optionally write out the response if you need to check if it worked:
' Response.Write http.responseText
' Clean up:
Set objHTTP = Nothing
%>