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 | |
ACCOUNT_SID = "ACxxxxx" | |
AUTH_TOKEN = "yyyyyyyy" | |
client = TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN) | |
client.sms.messages.create(from_="+15556667777", to="+15558675309", body="Reminder: Harley Manning will be signing copies of his new book at the Commonwealth Club Thursday at 6 p.m.") |
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
require 'rubygems' # not necessary with ruby 1.9 but included for completeness | |
require 'twilio-ruby' | |
# put your own credentials here | |
account_sid = 'ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' | |
auth_token = 'yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy' | |
# set up a client to talk to the Twilio REST API | |
@client = Twilio::REST::Client.new account_sid, 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 | |
ACCOUNT_SID = 'ACxxxxxxxxxxxxxxxxx' | |
AUTH_TOKEN = 'yyyyyyyyyyyyyyyyyyyy' | |
client = TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN) | |
messages = client.sms.messages.list() | |
for msg in messages: |
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
<Response> | |
<Gather action="handler.php"> | |
<Say>Press 1 to do some stuff.</Say> | |
<Say>Press 2 to do some more stuff.</Say> | |
<Say>Press star to leave a voice message</Say> | |
</Gather> | |
</Response> |
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
@app.route('/caller', methods=['POST']) | |
def caller(): | |
response = twiml.Response() | |
response.play("/static/sounds/intro.mp3") | |
with response.gather(numDigits=1, action='/handle-key', method='POST') as g: | |
g.say("Please press 0 for PHP, 1 for Java, 2 for C, C++, or Objective C, 3 for Ruby, 4 for Javascript or Jay Query, 5 for Python, 6 for dot Net, 7 for HTML or CSS, 8 for SQL, or 9 for other") | |
response.pause() | |
response.redirect('/caller') | |
return str(response) |
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 | |
// Documentation is here: https://twilio-php.readthedocs.org/en/latest/ | |
require_once('auth.php'); | |
require_once('Services/Twilio.php'); | |
$client = new Services_Twilio($ACCOUNT_SID, $AUTH_TOKEN); | |
$message = $client->account->sms_messages->create( |
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
require 'rubygems' | |
require 'sinatra' | |
require 'twilio-ruby' | |
# Endpoint for the call-in line that your customers call. | |
post '/caller' do | |
Twilio::TwiML::Response.new do |r| | |
r.Enqueue 'Customer Queue', :waitUrl => '/wait' | |
end.text | |
end |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<title>Rob's Awesome Map</title> | |
<head> | |
<script | |
src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false"></script> | |
<style> | |
html, body, #map-canvas { | |
margin: 0; | |
padding: 0; |
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 render_template | |
app = Flask(__name__) | |
@app.route('/') | |
def index(): | |
return render_template('index.html') | |
if __name__ == "__main__": |
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
# Import our dependencies | |
from flask import Flask | |
from twilio import twiml | |
# Instantiate our Flask app | |
app = Flask(__name__) | |
# Create an endpoint '/conference' to serve as our |