Skip to content

Feature request: Custom base URL support for Telegram API #880

@Sajjad-Majdi

Description

@Sajjad-Majdi

Is your feature request related to a problem?

Yes. In some regions (like Iran), the default Telegram API servers are blocked. Users need to use custom API servers (like local bot API servers or reverse proxies) to connect to Telegram.

Describe the solution you'd like

Add a configuration option to specify a custom base URL for the Telegram API, instead of hardcoding api.telegram.org.

Example config:

channels:
  telegram:
    token: YOUR_BOT_TOKEN
    api_base_url: https://custom-api-server.example.com

Describe alternatives you've considered

  • Using system-wide VPN (not always feasible on embedded devices)
  • Patching the code manually (not maintainable)

Additional context

This is a common requirement for users in regions with Telegram restrictions. The official python-telegram-bot library already supports this via base_url parameter.

Thanks for considering this!

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions