I have a Kik bot that I am hosting on my computer. I setup the configureation with the following code:
let request = require('request')
request.post('https://api.kik.com/v1/config',
{
"auth":{
"user":"bhs************",
"pass":"*******-*****-*****-****"
},
"headers":{
"User-Agent":"request"
},
"form":{
"webhook":"https://(my public ip):8080",
"features":{
"manuallySendReadReceipts":false,
"receiveReadReceipts":false,
"receiveDeliveryReceipts":false,
"receiveIsTyping":false
}
}
});
And here is the code for my actual bot:
'use strict';
let util = require('util');
let https = require('https');
let Bot = require('@kikinteractive/kik');
// Configure the bot API endpoint, details for your bot
let bot = new Bot({
username: 'bhs************',
apiKey: '*******-*****-*****-****',
baseUrl: 'https://(my public ip):8080'
});
bot.updateBotConfiguration();
bot.onTextMessage((message) => {
console.log("New Message")
message.reply(message.body);
});
// Set up your server and start listening
let server = https
.createServer(bot.incoming())
.listen(8080);
console.log("Server Running on port 8080")
I have setup port forwarding on my router to redirect to my computer with the internal and external port of 8080. I also have the protocol set to both TCP and UDP. Here is a photo if that setup:
My bot has stopped telling me that I need to Finnish setting it up every time I text it, but now it never says anything. Is there something that I'm doing wrong here?
It sounds like its not hitting your endpoint properly. I would suggested using ngrok to give yourself a public URL and it will forward to your local IP.