Your own Telegram API address
If your hosting cannot reach Telegram, Pro can send messages through a proxy server: your server outside the blocked network that forwards requests to api.telegram.org.
The proxy sees the bot token and every message, with customers’ details, so do not use public proxies. MTProto proxies will not work: they do not serve the Bot API.
Set up the proxy
Any server with access to Telegram will do. An example for nginx, where you replace the domain and the certificate paths:
server {
listen 443 ssl;
server_name tg-proxy.example.com;
ssl_certificate /etc/letsencrypt/live/tg-proxy.example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/tg-proxy.example.com/privkey.pem;
location / {
proxy_pass https://api.telegram.org;
proxy_set_header Host api.telegram.org;
proxy_ssl_server_name on;
}
}Enter the address
- Connect the bot first on the Connection tab: the address is checked with its token.
- Enter the address in Telegram API address on the same tab, for example
https://tg-proxy.example.com, and save.
The plugin asks Telegram for the bot’s details through this address before saving. If that works, you see “The address works”, and messages go through the proxy. If not, the address is not saved and the message says why.
An address without https also works, but the token and messages then travel unencrypted, and the tab warns about it.
To send directly to api.telegram.org again, clear the field and save.