Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit da60f33

Browse files
committed
Adding in responses.
1 parent fdcf965 commit da60f33

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

run.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
from flask import Flask, request, redirect
2+
import twilio.twiml
3+
4+
app = Flask(__name__)
5+
6+
@app.route("/", methods=['GET', 'POST'])
7+
def trying():
8+
resp = twilio.twiml.Response()
9+
resp.sms("I am responding.")
10+
return str(resp)
11+
12+
if __name__ == "__main__":
13+
app.run(debug=True)

send_sms.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
from twilio.rest import TwilioRestClient
2+
3+
account_sid = "AC111c46ac0792be29fe1cd3afc0b9ced4"
4+
auth_token = "6eeb51495e12c16c3b44bea2dae1335a"
5+
client = TwilioRestClient(account_sid, auth_token)
6+
7+
message = client.sms.messages.create(from_="+18326034575",
8+
body="Does this work!" )

0 commit comments

Comments
 (0)