A Cloudflare Worker that translates header-based auth into Telegram's token-in-URL format.
This proxy lets any API client that uses standard Authorization headers (like PromptQL) communicate with the Telegram Bot API seamlessly. Your bot token never appears in the URL.
Pass your bot token in the Authorization header:
Authorization: Bearer <bot_token>
The token format is 123456789:ABCdefGHI-jklMNOpqrSTUvwxYZ (the one you get from @BotFather).
https://tg.paritoshraj.com
file_path).getFile.data:<mime>;base64,<data> URI in any file field (document, photo, audio, video, voice, sticker, animation, thumbnail). Include an optional filename field to set the file name. The proxy decodes the base64 and forwards it as a proper multipart upload to Telegram.# Get bot info
curl -H "Authorization: Bearer YOUR_TOKEN" https://tg.paritoshraj.com/getMe
# Send a message
curl -X POST https://tg.paritoshraj.com/sendMessage \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"chat_id": 123456, "text": "Hello from the proxy!"}'
# Get updates
curl -H "Authorization: Bearer YOUR_TOKEN" \
"https://tg.paritoshraj.com/getUpdates?offset=0&limit=10"
# Download a file
curl -H "Authorization: Bearer YOUR_TOKEN" \
https://tg.paritoshraj.com/file/photos/file_123.jpg -o photo.jpg
# Send a document using base64-encoded content
curl -X POST https://tg.paritoshraj.com/sendDocument \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"chat_id": 123456,
"document": "data:text/vcard;base64,QkVHSU4OlZDQVJE...",
"filename": "contacts.vcf",
"caption": "Here are the contacts!"
}'
const TOKEN = "123456789:ABCdef...";
const res = await fetch("https://tg.paritoshraj.com/sendMessage", {
method: "POST",
headers: {
"Authorization": `Bearer ${TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
chat_id: 123456,
text: "Hello!",
}),
});
const data = await res.json();
console.log(data);
import requests
TOKEN = "123456789:ABCdef..."
headers = {"Authorization": f"Bearer {TOKEN}"}
# Get bot info
r = requests.get("https://tg.paritoshraj.com/getMe", headers=headers)
print(r.json())
# Send message
r = requests.post("https://tg.paritoshraj.com/sendMessage", headers=headers, json={
"chat_id": 123456,
"text": "Hello from Python!"
})
print(r.json())
| Setting | Value |
|---|---|
| Base URL | https://tg.paritoshraj.com |
| Auth Type | API Key |
| Header | Authorization |
| Prefix | Bearer |
| API Key | Your bot token from @BotFather |
| Status | Meaning |
|---|---|
401 | Missing or invalid Authorization header or token format |
4xx | Telegram API error (passed through as-is) |
502 | Could not reach the Telegram API |