Skip to content

Commit f83c90b

Browse files
author
Tony Bedford
committed
Initial versions.
1 parent 8b16f55 commit f83c90b

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

messages/delivery-receipt.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/usr/bin/env python3
2+
from flask import Flask, request, jsonify
3+
from pprint import pprint
4+
5+
app = Flask(__name__)
6+
7+
@app.route("/webhooks/delivery-receipt", methods=['POST'])
8+
def delivery_receipt():
9+
data = request.get_json()
10+
pprint(data)
11+
return "200"
12+
13+
if __name__ == '__main__':
14+
app.run(host="www.example.org", port=3000)

messages/inbound-message.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/usr/bin/env python3
2+
from flask import Flask, request, jsonify
3+
from pprint import pprint
4+
5+
app = Flask(__name__)
6+
7+
@app.route("/webhooks/inbound-sms", methods=['POST'])
8+
def inbound_message():
9+
data = request.get_json()
10+
pprint(data)
11+
return "200"
12+
13+
if __name__ == '__main__':
14+
app.run(host="www.example.org", port=3000)
15+

0 commit comments

Comments
 (0)