Skip to content

Instantly share code, notes, and snippets.

Created Jun 14, 2019
What would you like to do?
Cosmic Messenger twilio client file
var config = require('./config');
module.exports.sendSms = function (to, message) {
var client = require('twilio')(config.accountSid, config.authToken);
return client.api.messages
body: message,
to: to,
from: config.sendingNumber,
}).then(function (data) {
console.log('Administrator notified');
}).catch(function (err) {
console.error('Could not notify administrator');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment