---
service: "Publicasta"
schema_version: "1.0"
article_id: 225
title: "RouteHook: a Telegram Bot API relay for stable bot delivery"
language: "en"
default_language: "ru"
canonical_url: "https://publicasta.com/routehook/routehook_telegram_bot_api_relay?lang=en"
json_url: "https://publicasta.com/routehook/routehook_telegram_bot_api_relay.json?lang=en"
api_url: "https://publicasta.com/api/public/v1/channels/routehook/articles/routehook_telegram_bot_api_relay?lang=en"
channel_url: "https://publicasta.com/api/public/v1/channels/routehook"
channel_articles: "https://publicasta.com/api/public/v1/channels/routehook/articles"
search_url: "https://publicasta.com/api/public/v1/search"
documentation_url: "https://publicasta.com/api-docs#reading-publicasta"
openapi_url: "https://publicasta.com/api-docs/openapi.json"
published_at: "2026-07-29T15:11:24+00:00"
updated_at: "2026-07-29T15:11:24+00:00"
translations:
  - language: "en"
    html_url: "https://publicasta.com/routehook/routehook_telegram_bot_api_relay?lang=en"
    markdown_url: "https://publicasta.com/routehook/routehook_telegram_bot_api_relay.md?lang=en"
    json_url: "https://publicasta.com/routehook/routehook_telegram_bot_api_relay.json?lang=en"
  - language: "ru"
    html_url: "https://publicasta.com/routehook/routehook_telegram_bot_api_relay?lang=ru"
    markdown_url: "https://publicasta.com/routehook/routehook_telegram_bot_api_relay.md?lang=ru"
    json_url: "https://publicasta.com/routehook/routehook_telegram_bot_api_relay.json?lang=ru"
---

# RouteHook: a Telegram Bot API relay for stable bot delivery

> RouteHook sits between Telegram and your server: keep your existing webhook, get a personal Bot API relay URL, and keep your bot running without rewriting webhook code.

![RouteHook relay diagram: Telegram updates go through RouteHook to your webhook, Bot API requests use routehook.ipcfg.com](https://publicasta.com/storage/projects/26/pages/225/2026/07/81a00e95-cc42-4ba4-9646-e83093b7798a.webp)

 If you already run a Telegram bot, your setup is probably straightforward: Telegram sends updates to your webhook, and your code sends replies through the Bot API.

 The rough part starts when direct Bot API requests become unreliable: outgoing connections behave differently across hosting environments, server networks are inconsistent, or you want a clean infrastructure layer without moving the whole project.

 RouteHook is built for that exact job. It is a Telegram Bot API relay running on Cloudflare Workers.

 You can start the setup directly in Telegram: [@RouteHookBot](https://t.me/RouteHookBot).

 ## How it works

 RouteHook sits between Telegram and your server:

 ```text
Telegram -> RouteHook -> your webhook
```

 For outgoing Bot API requests, you use a personal relay URL:

 ```text
https://routehook.ipcfg.com/<public_id>/bot<TOKEN>/<method>
```

 Instead of calling:

 ```text
https://api.telegram.org/bot<TOKEN>/sendMessage
```

 you call:

 ```text
https://routehook.ipcfg.com/<public_id>/bot<TOKEN>/sendMessage
```

 The rest of your bot logic stays the same.

 ## What you usually do not need to change

 If your bot already has a working webhook, you normally do not need to edit its webhook code. During setup, RouteHook checks the current webhook and lets you keep it.

 In that mode the flow is:

 ```text
Telegram sends an update to RouteHook
RouteHook verifies its internal secret
RouteHook forwards the update to your current webhook
your server processes the update as before
```

 There is no SDK to add, no project migration, no npm package, and no handler rewrite.

 ## When API-only mode fits

 Some bots do not receive incoming webhook updates. They only send messages: alerts, service reports, CRM notifications, admin messages, or scheduled updates.

 For that scenario, RouteHook has API-only mode. It does not set a webhook and only gives you a Bot API relay URL.

 ## What RouteHook does for security

 RouteHook does not store update bodies or message texts. The bot token is required to configure the relay, but it is not shown back in the interface.

 For the Telegram -> RouteHook segment, RouteHook uses an internal secret. For the RouteHook -> your webhook segment, you can optionally add your own header:

 ```text
X-RouteHook-Secret
```

 This is not required for a normal setup, but it is useful when your webhook should accept requests only from RouteHook.

 ## How to connect

 1. Open the RouteHook Telegram bot.
2. Buy one relay for one bot.
3. Send your Telegram bot token.
4. If an existing webhook is found, choose `Keep current webhook`.
5. Get your personal `API base URL`.
6. Replace `https://api.telegram.org` in your code with the relay URL.

 After setup, you can check the status with:

 ```text
/checkbot <public_id>
```

 It shows the current Telegram webhook, pending updates, and a short hint about where to look if the bot does not respond.

 ## Who it is for

 RouteHook is for small and medium Telegram bots running on PHP, Node.js, Python, or any other backend, when you need a simple relay without moving the project.

 The main idea is simple: keep the webhook, replace the Bot API base URL, and continue running.

 Try RouteHook in Telegram: [@RouteHookBot](https://t.me/RouteHookBot).
