This sample-bot uses linebot framework
-
To start Messaging API
-
Get Channel ID,Secret,Token Document
var linebot = require('linebot');
var bot = linebot({
channelId: CHANNEL_ID,
channelSecret: CHANNEL_SECRET,
channelAccessToken: CHANNEL_ACCESS_TOKEN
});
bot.on('message', function (event) {
event.reply(event.message.text).then(function (data) {
// success
}).catch(function (error) {
// error
});
});
bot.listen('/linewebhook', 3000);