node-botmetrics
Official NodeJS client for BotMetrics, bot & conversation analytics.
Installation
npm install node-botmetrics --save
Facebook Messenger SDK
var botmetrics = 'API_TOKEN'facebook;
Incoming
app
Outgoing
// Example POST to Facebook var fbData = recipient: id: fbUserId message: text: 'Hi there!' ; var options = url: 'https://graph.facebook.com/v2.6/me/messages' qs: access_token: FB_PAGE_TOKEN method: 'POST' json: fbData; ;
Other Messaging Platforms
var botmetrics = 'API_TOKEN'; botmetrics;
Debug Mode
// Turn on debug mode to print BotMetrics API messagesvar botmetrics = 'API_TOKEN' true;
Documentation
View complete documentation here: https://bot-metrics.com/docs