Worker Active

Telegram API Proxy

Cloudflare Worker — Stable Telegram Bot API Relay

API Endpoint

https://tgapi.aierliz.top/bot

Replace https://api.telegram.org with the URL above in your bot code.

Code Examples

const BOT_TOKEN = "YOUR_BOT_TOKEN";
const CHAT_ID   = "YOUR_CHAT_ID";
const PROXY_URL = "https://tgapi.aierliz.top/bot";

async function sendMessage(text) {
    const url = PROXY_URL + BOT_TOKEN + "/sendMessage";
    const response = await fetch(url, {
        method: "POST",
        headers: { "Content-Type": "application/json" },
        body: JSON.stringify({
            chat_id: CHAT_ID,
            text: text,
            parse_mode: "Markdown"
        })
    });
    return response.json();
}

sendMessage("Hello from Proxy!").then(console.log);
import requests

PROXY_URL = "https://tgapi.aierliz.top/bot"
BOT_TOKEN = "YOUR_BOT_TOKEN"
CHAT_ID   = "YOUR_CHAT_ID"

def send_message(text):
    url = PROXY_URL + BOT_TOKEN + "/sendMessage"
    payload = {
        "text": text,
        "chat_id": CHAT_ID,
        "parse_mode": "Markdown",
        "disable_web_page_preview": True
    }
    response = requests.post(url, json=payload)
    return response.json()

result = send_message("Hello from Proxy!")
print(result)
const TelegramBot = require("node-telegram-bot-api");

const TOKEN     = "YOUR_BOT_TOKEN";
const PROXY_URL = "https://tgapi.aierliz.top/bot";

const bot = new TelegramBot(TOKEN, {
    polling: true,
    baseApiUrl: PROXY_URL.replace("/bot", "")
});

bot.on("message", function (msg) {
    bot.sendMessage(msg.chat.id, "Echo: " + msg.text);
});
import asyncio
from aiogram import Bot, Dispatcher, types
from aiogram.client.session.aiohttp import AiohttpSession

PROXY_URL = "https://tgapi.aierliz.top/bot"
BOT_TOKEN = "YOUR_BOT_TOKEN"

session = AiohttpSession(api=PROXY_URL.replace("/bot", ""))
bot = Bot(token=BOT_TOKEN, session=session)
dp  = Dispatcher()

@dp.message()
async def echo(message: types.Message):
    await message.answer("Echo: " + message.text)

async def main():
    await dp.start_polling(bot)

asyncio.run(main())

Connection Test

Features

Rate limiting per IP, token & burst
Circuit breaker with auto-recovery
Retry with exponential backoff
Security headers (CSP, HSTS, Permissions-Policy)
Bot token format validation & caching
File & media upload support
XSS, SQLi & path traversal detection
Edge caching per Telegram API method