Skip to content

Instantly share code, notes, and snippets.

@RobSpectre
Created August 7, 2012 21:58
Show Gist options
  • Save RobSpectre/3289740 to your computer and use it in GitHub Desktop.
Save RobSpectre/3289740 to your computer and use it in GitHub Desktop.
Karaoke Music
import flask
from twilio import twiml
app = flask.Flask(__name__)
@app.route('/tunes', methods=['POST'])
def tunes():
response = twiml.Response()
response.play('http://example.com/tastytunes.mp3')
return str(response)
from local_settings import *
from twilio.rest import TwilioRestClient
ACCOUNT_SID = "ACxxxxxxxxxxxx"
AUTH_TOKEN = "yyyyyyyyyyyyyyy"
CALLER_ID = "+15556667777"
KARAOKE_NUMBER = "+15558675309"
client = TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN)
client.calls.create(from_=CALLER_ID, KARAOKE_NUMBER,
url="http://example.com/tunes")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment