Each bot needs its own API key for tracking.
Create a bot to get an API key.
npm install --save dashbot
Use the API key created above.
const dashbot = require('dashbot')(process.env.DASHBOT_API_KEY).universal;
You can send the following fields:
const messageForDashbot = {
"text": "Hi, bot",
"userId": "USERIDHERE123123",
"platformJson": {
"whateverJson": "any JSON specific to your platform can be stored here"
}
};
<strong>dashbot.logIncoming(messageForDashbot);</strong>
const messageForDashbot = {
"text": "Hello, my human pet",
"userId": "USERIDHERE123123",
"platformJson": {
"whateverJson": "any JSON specific to your platform can be stored here"
}
};
<strong>dashbot.logOutgoing(messageForDashbot);</strong>
View sample code.