Created
September 21, 2015 19:48
-
-
Save Brodan/f2806fa22f15d0275c1a to your computer and use it in GitHub Desktop.
A Processing sketch that demonstrates sending an SMS message using Twilio
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import http.requests.*; | |
String ACCOUNT_SID = "XXXXXXXXXXXXXXXXXXXXXXX"; | |
String AUTH_TOKEN = "YYYYYYYYYYYYYYYYYYYYYYY"; | |
PostRequest post = new PostRequest("https://api.twilio.com/2010-04-01/Accounts/" | |
+ ACCOUNT_SID + "/Messages"); | |
void setup() { | |
post.addData("From", "+15555555555"); | |
post.addData("To", "+15555555555"); | |
post.addData("Body", "Hello from Processing!"); | |
post.addUser(ACCOUNT_SID, AUTH_TOKEN); | |
post.send(); | |
println("Reponse Content: " + post.getContent()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment