This file contains 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
r = requests.get('https://api.github.com/events') | |
print(r.text) | |
r = requests.get('https://api.catapult.inetwork.com/v1/availableNumbers/local?areaCode=919', auth=('{your_token}', '{your_secret')) | |
r = requests.get('https://api.catapult.inetwork.com/v1/availableNumbers/local?areaCode=919', | |
auth=('{your_token}', '{your_secret')) | |
print(r.text) |
This file contains 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.get('/msgcallback', function(req, res) { | |
var response = { | |
to: req.query.from, | |
from: req.query.to, | |
text: getPhrase() | |
}; | |
var text = req.query.text.toLowerCase(); | |
switch(text) { | |
case 'i luv u': | |
response.media = [getPhoto()]; |
This file contains 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.get('/callcallback', function (req, res) { | |
var response = new xml.Response(); | |
var playAudio = new xml.PlayAudio({ | |
url: 'https://s3.amazonaws.com/bwdemos/vday/vday.mp3' | |
}); | |
var hangup = new xml.Hangup(); | |
response.push(playAudio); | |
response.push(hangup); | |
res.send(response.toXml()); | |
}); |
This file contains 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
[ | |
{ "+14155989166": "Chipotle: Here it is. Ur free burrito. http://vbs.cm/o0Du8W. Expires 2/25. Reply FOIL to sign up for offers & alerts. Msg freq varies. Msg&data may apply" }, | |
{ "+19192991704": "Chipotle: Here it is. Ur free burrito. http://vbs.cm/Y06uIW. Expires 2/25. Reply FOIL to sign up for offers & alerts. Msg freq varies. Msg&data may apply" }, | |
{ "+14154292562": "Chipotle: Here it is. Ur free burrito. http://vbs.cm/W0Xu1W. Expires 2/25. Reply FOIL to sign up for offers & alerts. Msg freq varies. Msg&data may apply" }, | |
{ "+19194390814": "Chipotle: Here it is. Ur free burrito. http://vbs.cm/j0QuNW. Expires 2/25. Reply FOIL to sign up for offers & alerts. Msg freq varies. Msg&data may apply" }, | |
{ "+14154651445": "Chipotle: Here it is. Ur free burrito. http://vbs.cm/I06uDW. Expires 2/25. Reply FOIL to sign up for offers & alerts. Msg freq varies. Msg&data may apply" }, | |
{ "+14156128136": "Chipotle: Here it is. Ur free burrito. http://vbs.cm/30CuqY. Expires 2/25. Reply FOIL to sign up for offers & alerts. |
This file contains 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
// find your credentials http://ap.bandwidth.com/docs/security/ | |
curl -v -X GET https://api.catapult.inetwork.com/v1/availableNumbers/local?areaCode=818 \ | |
-u {YOUR_TOKEN}:{YOUR_SECRET} \ | |
-H "Content-type: application/json" | |
//Fill in the number below with the number found above!! | |
curl -v -X POST https://api.catapult.inetwork.com/v1/users/{YOUR_USER_ID}/phoneNumbers \ | |
-u {YOUR_TOKEN}:{YOUR_SECRET} \ | |
-H "Content-type: application/json" \ |
This file contains 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
[ | |
{ '+19192991705': 'Chipotle: Almost there. Click here for your free burrito: https://raincheck.hit2c.com/hdKsVNAJv9t9u4YMXRc6FmXx' }, | |
{ '+17026230824': 'Chipotle: Almost there. Click here for your free burrito: https://raincheck.hit2c.com/Jteh8gLBfPj5MvPc97d2Esy8' }, | |
{ '+19192991710': 'Chipotle: Almost there. Click here for your free burrito: https://raincheck.hit2c.com/TRGdbjoRYTiRDd7ZG4ASbsE1' }, | |
{ '+12056247316': 'Chipotle: Almost there. Click here for your free burrito: https://raincheck.hit2c.com/EvL6Qnncw82HAMCA4nbwbJCf' }, | |
{ '+19193716193': 'Chipotle: Almost there. Click here for your free burrito: https://raincheck.hit2c.com/cxAinrNxLd6KrRuqyBgKoguq' }, | |
{ '+19196702511': 'Chipotle: Almost there. Click here for your free burrito: https://raincheck.hit2c.com/c8Q5wMbXuk4z7nWEHtMhCY32' }, | |
{ '+19192991715': 'Chipotle: Almost there. Click here for your free burrito: https://raincheck.hit2c.com/s7TnrTibxS5SrCJj4odGaNt1' }, | |
{ '+14154624756': 'Chipotle: Almost there. Click here for your free burrito: https:/ |
This file contains 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
{ '+19192991705': 'Chipotle: Almost there. Click here for your free burrito: https://raincheck.hit2c.com/hdKsVNAJv9t9u4YMXRc6FmXx' } | |
{ '+17026230824': 'Chipotle: Almost there. Click here for your free burrito: https://raincheck.hit2c.com/Jteh8gLBfPj5MvPc97d2Esy8' } | |
{ '+19192991710': 'Chipotle: Almost there. Click here for your free burrito: https://raincheck.hit2c.com/TRGdbjoRYTiRDd7ZG4ASbsE1' } | |
{ '+12056247316': 'Chipotle: Almost there. Click here for your free burrito: https://raincheck.hit2c.com/EvL6Qnncw82HAMCA4nbwbJCf' } | |
{ '+19193716193': 'Chipotle: Almost there. Click here for your free burrito: https://raincheck.hit2c.com/cxAinrNxLd6KrRuqyBgKoguq' } | |
{ '+19196702511': 'Chipotle: Almost there. Click here for your free burrito: https://raincheck.hit2c.com/c8Q5wMbXuk4z7nWEHtMhCY32' } | |
{ '+19192991715': 'Chipotle: Almost there. Click here for your free burrito: https://raincheck.hit2c.com/s7TnrTibxS5SrCJj4odGaNt1' } | |
{ '+14154624756': 'Chipotle: Almost there. Click here for your free burrito: https://rainchec |
This file contains 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 bw = require('node-bandwidth'); | |
var client = new bw.Client("u-{your_user_id}", "t-{your_token}", "{your_Secret}"); | |
var Promise = require('bluebird'); | |
var PhoneNumber = Promise.promisifyAll(bw.PhoneNumber); | |
var Message = Promise.promisifyAll(bw.Message); | |
var burritoNumber = '+1888222'; | |
var sendMessage = function (message) { | |
console.log("Ordering Burrito"); |
This file contains 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 | |
/* | |
Ordering a phone number from bandwidth (http://bit.ly/1QQtoCF) | |
Information pulled from http://bit.ly/1okTYuf | |
*/ | |
// Be sure to update the user id, token, and secret | |
$url = "https://{YOUR_TOKEN}:{YOUR_SECRET}@api.catapult.inetwork.com/v1/users/{YOUR_USERID}/phoneNumbers"; | |
// Be sure that the number is available | |
$data = array( |
This file contains 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
bandwidth.Message.create( | |
{ | |
from: "+19195551212", | |
to: "+191955512142", | |
text: "Test" | |
}, | |
function(err, message){ | |
console.log(err); | |
console.log(message); | |
}); |