Question
Hello.
How i can deploy many bots with webhook updates through local proxy?
The bot checks for its token in the path in each request. Therefore, different bots could setWebHook() different paths that are handled by the proxy. Imagine this:
Bot 1:
bot.setWebHook(`https://custom-url.com/bot${TOKEN_1}`);
Bot 2:
bot.setWebHook(`https://custom-url.com/bot${TOKEN_2}`);
Note the different tokens TOKEN_1 and TOKEN_2. Now you'll have to configure your proxy (listening at url https://custom-url.com) to pass requests in path /bot${TOKEN_1} to bot 1 and /bot${TOKEN_2} to bot 2.
Hope that helps.
This doesn't seem to work. Error that two items are running on the same port when you do this.
Ah sorry. Do you do set webhook twice on the same bot?
Same issue. Any solution?
Is only one Bot instance possible by server? (using same port 8443)
Most helpful comment
The bot checks for its token in the path in each request. Therefore, different bots could
setWebHook()different paths that are handled by the proxy. Imagine this:Bot 1:
Bot 2:
Note the different tokens
TOKEN_1andTOKEN_2. Now you'll have to configure your proxy (listening at urlhttps://custom-url.com) to pass requests in path/bot${TOKEN_1}to bot 1 and/bot${TOKEN_2}to bot 2.Hope that helps.
ANS