Created
September 21, 2015 19:48
A Processing sketch that demonstrates sending an SMS message using Twilio
This file contains hidden or 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