Telcom Node.js
Node.js library for abstracting the difference between Twilio and Plivo. To start only sms is going to be supported.
Installation
telcom is available as an npm package. Install the latest version with:
npm install telcom
Usage
var TelcomClient = ; var client = provider : 'twilio' sid : 'ACCOUNT_SID' token : 'AUTH_TOKEN';
Sending SMS
client;
Handle SMS Message URL
Telcome provides a few methods for validating and normalizing the requests from both Plivo and Twilio. These methods currently only support Express but could be modified slightly in the future to all other frameworks.
// Add the middleware to validate request from Providerapp // Add route with telcom.onSms handler to normalize data.app;
Current Providers
- Twilio - twilio
- Plivo - plivo
License
telcom is licensed under the MIT License.