Allow configuring the Telegram Bot API base URL

The Telegram provider in the Discourse Chat Integration plugin currently sends all requests directly to https://api.telegram.org.

In some countries and hosting environments, Telegram is blocked or unavailable at the network level. This prevents the integration from working, including the initial webhook setup.

I propose adding a site setting that allows administrators to replace the Telegram Bot API base URL with the address of a trusted HTTPS proxy. For example, requests could be routed through a small Cloudflare Worker while keeping the existing Telegram integration unchanged.

The default value would remain https://api.telegram.org, so this would not affect existing installations.

My PR:

2 Likes