Skip to content

Instantly share code, notes, and snippets.

@mtaran-google mtaran-google/ Secret forked from jpf/
Last active Aug 29, 2015

What would you like to do?
import webapp2
from twilio import twiml
from import TwilioRestClient
class HelloMonkey(webapp2.RequestHandler):
def post(self):
r = twiml.Response()
r.say("Hello Monkey!")
self.response.headers['Content-Type'] = 'text/xml'
class SendSMS(webapp2.RequestHandler):
def get(self):
# replace with your credentials from:
account_sid = "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
auth_token = "xxxxxxxxxxxxxxxxxxxxxxxxxx"
client = TwilioRestClient(account_sid, auth_token)
# replace "to" and "from_" with real numbers
rv = client.messages.create(to="+14155551212",
body="Hello Monkey!")
app = webapp2.WSGIApplication([('/twiml', HelloMonkey),
('/send_sms', SendSMS)],
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.