nexmofy
v1.0.0
Published
Nexmo callback receiver which based on EventEmiiter
Maintainers
Readme
nexmofy
Nexmo callback receiver which based on Node's EventEmiiter. Nexmofy provides extensible APis.
Getting Started
Create new HTTP Server which handle Callback Requests.
var nexmofy = require('nexmofy');
nexmofy.listen(9000);... or you can register routes on your own Express Application.
var express = require('express'),
nexmofy = require('nexmofy');
var myApp = express();
...
nexmofy.registerRoutes(myApp);Register Event Listeners
nexmofy.channel.on('onSMSReceived', function (message) {
console.log('got new message: ', message);
});Register Callback URL on Nexmo Dashboard
**NOTE: nexmofys API Endpoint is:** /api/nexmo/sms/callback`.
Enjoy! :)
Events
onSMSReceived(payload)
Payload Information
Name | Type | Description | Original Key ------------ | ------------- | ------------- | ------------- id | String | Message ID | messageId from | String | Phone Number which Message was sent from. | msisdn to | String | Phone Number which Message was sent to. | to text | String | Message Body | text type | String | Type | type keyword | String | Keyword | keyword timestamp | Date | Message timestamp | message-timestamp
Milestone
- Changeable API Endpoint path
