This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from twilio.rest import TwilioRestClient | |
| TWILIO_ACCOUNT_SID = 'ACxxxxxxxxxxxxxxxx' | |
| TWILIO_AUTH_TOKEN = 'yyyyyyyyyyyyyyyyyyy' | |
| TWILIO_NUMBER = '+1555667777' | |
| MY_NUMBER = '+15558889999' | |
| client = TwilioRestClient(TWILIO_ACCOUNT_SID, TWILIO_AUTH_TOKEN) | |
| client.messages.create(from_=TWILIO_NUMBER, to=MY_NUMBER, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from twilio.rest import TwilioRestClient | |
| TWILIO_ACCOUNT_SID = 'ACxxxxxxxxxxxxxxxx' | |
| TWILIO_AUTH_TOKEN = 'yyyyyyyyyyyyyyyyyyy' | |
| client = TwilioRestClient(TWILIO_ACCOUNT_SID, TWILIO_AUTH_TOKEN) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from twilio.rest import TwilioRestClient |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| python |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pip install twilio flask |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| require_once('Services/Twilio.php'); | |
| $ACCOUNT_SID = "ACxxxxxxxxxxxxxxxxxxxxx"; | |
| $AUTH_TOKEN = "yyyyyyyyyyyyyyyyyyyyyyyy"; | |
| $client = new Services_Twilio($ACCOUNT_SID, $AUTH_TOKEN); | |
| $message = $client->account->messages->sendMessage( | |
| '+15556667777', // From a Twilio number in your account | |
| '+15558675309', // Text any number | |
| "Email me at rob@example.com" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from flask import Flask | |
| from flask import request | |
| from twilio import twiml | |
| import requests | |
| app = Flask(__name__) | |
| @app.route('/voice', methods=['POST']) | |
| def voice(): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var http = require('http'), | |
| twilio = require('twilio'); | |
| http.createServer(function (req, res) { | |
| //Create TwiML response | |
| var twiml = new twilio.TwimlResponse(); | |
| twiml.record(); | |
| res.writeHead(200, {'Content-Type': 'text/xml'}); | |
| res.end(twiml.toString()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from flask import Flask | |
| from flask import request | |
| from twilio import twiml | |
| # Declare and configure application | |
| app = Flask(__name__) | |
| @app.route('/sms', methods=['POST']) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from flask import Flask | |
| from flask import request | |
| from twilio import twiml | |
| import serial | |
| # Declare and configure application | |
| app = Flask(__name__, static_url_path='/static') |