Go to Functions:
Create a SMS function:
exports.handler = function(context, event, callback) {
context.getTwilioClient().messages.create({
to: '+1253xxxxxxx',
from: '+1256906xxxx', //twilio number
body: 'New Student Recieved'
}).then(msg => {
callback(null, msg.sid);
}).catch(err => callback(err));
}
Now just visit your */sms API to send the SMS!
Top comments (0)