Skip to content

Instantly share code, notes, and snippets.

@snahor
Created Apr 11, 2012
Embed
What would you like to do?
import urllib
URL = 'http://api.tropo.com/1.0/sessions'
TOKEN = ''
def send_sms(to, shout):
params = urllib.urlencode({
'action': 'create',
'token': TOKEN,
'shout': shout,
'to': to,
})
opener = urllib.urlopen(URL + '?' + params)
response = opener.read()
# whatever u want
message(shout, {'network': "SMS", 'to': to})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment