Skip to content

Instantly share code, notes, and snippets.

@RobSpectre
Created July 20, 2012 13:39
Show Gist options
  • Save RobSpectre/3150763 to your computer and use it in GitHub Desktop.
Save RobSpectre/3150763 to your computer and use it in GitHub Desktop.
Get the numbers and call them demo
# Pull your account settings from a local file
from local_settings import *
# Get the TwilioRestClient class to access Twilio via REST
from twilio.rest import TwilioRestClient
# Authenticate to Twilio using the local_settings you imported
client = TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN)
# List all the SMS messages you've received to a number
client.sms.messages.list(to="+15558675309")
# Iterate through all the numbers and call them!
for msg in _:
client.calls.create(from_="+15558675309", to=msg.from_, url="http://www.twimlbin.com/whatever")
ACCOUNT_SID = 'ACxxxxxx'
AUTH_TOKEN = 'yyyyyyyyy'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment