Comment on page
📧
Python ve Twilio ile SMS server oluşturma
from flask import Flask, request, redirect
from twilio.twiml.messaging_response import MessagingResponse
app = Flask(__name__)
@app.route("/sms", methods=['POST'])
def sms_reply():
"""Respond to incoming calls with a simple text message."""
# Use this data in your application logic
from_number = request.form['From']
to_number = request.form['To']
body = request.form['Body']
# Start our TwiML response
resp = MessagingResponse()
# Add a message
resp.message("The Robots are coming! Head for the hills!")
return str(resp)
if __name__ == "__main__":
app.run(debug=True)
ngrok config add-authtoken <token>
ile giriş yapın, aksi halderesponse
döndüremezsinizngrok http 5000
ile tuneli açınhttps://a501237-20-229-74-178.eu.ngrok.io/sms
🚨 Türkiyeden yurt dışına SMS göndermek pahalı, twilio Turkiye numarası sunmuyor!