i encountered this error while setting webhook callback url in developers.facebook for my messenger bot. 
The messenger bot works fine locally forwarding port with ngrok but while using the remote server url, it throws the error. Other bots like viber and telegram are working fine.
note :
- Viber and telegram are running on the same port. messenger bot is runnin in a different port. Still all the ports are exposed from the server.
Implementation of messenger and other bots :
const botTelegram = app.get(TelegramBotService).getBot()
const botViber = app.get(ViberBotService).getBot()
const botMessenger = app.get(MessengerBotService).getBot()
const botWhatsapp = app.get(WhatsappBotService).getBot()
app.use(botTelegram.webhookCallback("/telegram/webhook"))
app.use("/viber/webhook", botViber.middleware())
botMessenger.start(3001)
My messengerbot service :
@Injectable()
export class MessengerBotService {
private readonly messengerBot : any
private readonly downloadFolderPath = join(__dirname, '..', '..', 'downloads');
constructor(
@InjectModel(Message.name) private messageModel : Model<MessageDocument>,
@InjectModel(User.name) private userModel : Model<UserDocument>,
private realTimeGateway : RealTimeGateway
){
this.messengerBot = new BootBot({
accessToken : process.env.MESSENGER_ACCESS_TOKEN,
verifyToken : process.env.MESSENGER_VERIFY_TOKEN,
appSecret : process.env.MESSENGER_APP_SECRET,
webhook : '/messenger/webhook'
})
this.messengerBot.on('message', async(payload, chat) =>{
// remaining working functionalities