Add ability to configure Local Telegram Bot API Server

Telegram allows you to set up your own local bot api server. This gives the added benefit of being able to send files up to 2000MB in size rather than just 50MB.

It would be great to have the option to specify the ip address and port of the telegram bot api server so requests can go to a local machine instead of The local api server only offers plain http connection so allowing insecure connection to the api server would also have to be allowed in the telegram bot config for this to work.

In the time being I was thinking as a workaround I could reverse proxy the local telegram server and then do a dns rewrite from to my local host serving the telegram bot api.

Currently I am using the webhooks method for the telegram bot configuration. I use the telegram bot to send surveillance photo notifications with inline keyboards that link to their respective video clips in frigate. I have a button you can press to get the video using the frigate event id. When I press the button the video clip is uploaded to my telegram security group. Most of the time this works. However when the video clip is larger than 50MB the button doesn’t do anything as expected since the limitation is 50MB. So having a local api server for the telegram bot would fix this since no video clip that I would need to upload would be bigger than 2000MB.

Thanks in advance for any support to make this feature happen

Edit: Node Red Telegram Bot has the option to specify the address to the telegram api, so I was able to use Node Red to accomplish what I wanted to do. It would be very nice if this option was made available in Home Assistant so node red isn’t necessary