← All requests
0

custom Bot API server URL for Telegram integration

OpenzaralX (GitHub) · · edited

Problem Statement

api.telegram.org is not reliably reachable from China, Iran and Russia. I already run my own telegram-api instance for this reason, but Kaneo always calls api.telegram.org and there is no way to point it somewhere else.

Using your own mirror servers for the Bot API is also the only way to bypass file size limits and it allows you to do so very easily and quickly.

Proposed Solution

Add one optional field to the Telegram integration, next to bot token and chat ID: the Bot API server URL, defaulting to https://api.telegram.org. (Traffic from url redirects to api.telegram.org)

Requests would be built as {base}/bot{token}/{method} instead of hardcoding the host. Im not sure what exactly is used in the project to work with the telegram api, but in some npm packages I know that you can specify a mirror for telegram in options

No schema change needed as far as I can tell, the integration config is already JSON.

Alternative Solutions

Right now I use a generic webhook pointed at my own small service, which forwards to my Bot API server. It works, but I have to reimplement the message formatting that Kaneo already does, and it means running one more thing.

I also looked at DNS or proxy tricks on the host to redirect api.telegram.org. Too fragile, and it breaks TLS.

Relevant Context

Official server: https://github.com/tdlib/telegram-bot-api

Gitea integration already has a configurable instance URL, so the shape of the setting exists in the project.

Uptime Kuma https://github.com/louislam/uptime-kuma already has it
Image

One small thing that would need updating too: the Telegram docs page tells users to open https://api.telegram.org/bot/getUpdates to find the chat ID. With a custom server that URL changes as well.

Does this feature align with Kaneo's focus on simplicity?

Yes. It is one optional field with a sensible default, and it follows the same pattern as the configurable Gitea instance URL. Nothing changes for people using the default.


Originally requested by @zaralX on 2026-09-12. Original GitHub request #1722.

Issue #1722

Discussion 1

Sign in to comment.

Keyboard shortcuts

Anywhere

Go to requests
gh
Go to changelog
gc
Go to notifications
gn
Next or previous page
norp
Leave a text field or close a menu
Esc
Show this list
?

Requests

Move to the next or previous request
jork
Open the selected request
oorEnter
Vote on the selected request
v
Search
/
New request
c

Request

Vote
v
Write a comment
c
Edit
e