Skip to content

Latest commit

 

History

History
51 lines (37 loc) · 1.33 KB

getting-started.md

File metadata and controls

51 lines (37 loc) · 1.33 KB

Getting Started

Welcome to use Botimize, the conversation analytics platform for bot builders.

In here, we are giving an example of building a botimize integrated messenger bot, written in nodeJS.

We also provide the same example for other platforms/languages, check out our sample bot list.

Four Steps

To get started, just follow four steps:

1. Create an analytics project on Botimize platform

Project Setting

2. Obtain the API key

Project Setting

3. Integrate our SDK (or use RESTful API) to track your chatbot

Initialization

const botimize = require('botimize')('<YOUR-BOTIMIZE-API-KEY>', 'facebook');

Log Incoming

app.post('/webhook', function (req, res)) {
  botimize.logIncoming(req.body);
  ...
}

Log Outgoing

let options = {
  uri: 'https://graph.facebook.com/v2.6/me/messages',
  qs: { access_token: accessToken },
  method: 'POST',
  json: true,
  body: messageBody,
};
request(options, function (error, response, body) {
  botimize.logOutgoing(options, {parse: 'request'});
  ...
});

4. View analytics on our dashboard