I have problem of setting up web hook for my chat bot i made using nodejs. Which is deployed on Heroku.
The app uses the following architecture :
const http = require('http');
const port = process.env.PORT || 8080;
// Viber will push messages sent to this URL. Web server should be internet-facing.
const webhookUrl = process.env.WEBHOOK_URL;
// I have used this as Heroku app name with https://dyno-125-92.herokuapp.com
http.createServer(ot.middleware()).listen(port, () => bot.setWebhook(webhookUrl));
Please, help me to setup a webhook using express or anything that can work with my bot?
I'm stuck.
Try this:
If it doesn't work, use - full code example to check.