Created
May 10, 2016 19:21
-
-
Save RobSpectre/a3b06b12b433512dbff62cd8419cb669 to your computer and use it in GitHub Desktop.
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 twilio = require('twilio'); | |
// Will use TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN env vars | |
var twilio_client = new Twilio(); | |
var notify = client.notifications.v1.services("ISxxxx"); | |
// create list of installs and declare signal_peeps | |
signal_peeps.forEach(function(signal_peep) { | |
notify.bindings.create({ | |
identity: signal_peep.email_address, | |
tag: "SIGNAL attendee" | |
}).then(function(response) { | |
console.log(response); | |
}).catch(function(error) { | |
console.log("Error: " + response); | |
}); | |
}); | |
notify.notifications.create({ | |
tag: "SIGNAL Attendee", | |
body: "Thanks for coming to SIGNAL! Get notify at https://twilio.com/docs/notify", | |
}).then(function(response) { | |
console.log(response); | |
}).catch(function(error) { | |
console.log("Error: " + error); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment