Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
17 lines (12 sloc) 360 Bytes
from flask import Flask, request, jsonify
from pprint import pprint
app = Flask(__name__)
@app.route('/webhooks/inbound-sms', methods=['GET', 'POST'])
def inbound_sms():
if request.is_json:
pprint(request.get_json())
else:
data = dict(request.form) or dict(request.args)
pprint(data)
return ('', 204)
app.run(port=3000)
You can’t perform that action at this time.