Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Simple TwilioApp
from flask import Flask, render_template, request
from import TwilioRestClient
app = Flask(__name__)
account = "MY_ACCOUNT_SID"
client = TwilioRestClient(account, token))
def ReturnForm():
return render_template('form.html')
@app.route('/', methods=['POST'])
def FormPost():
message = client.sms.messages.create(to="MY_NUMBER", from_="MY_TWILIO_NUMBER",
return render_template('success.html')
if __name__ == '__main__':'', port=5000)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment