API Documentation
Send a Google Drive link and get a short delivery link back.
How it works
Your site sends a Google Drive link and receives a short delivery link. When a user opens it, the Telegram bot shows live progress and delivers the file directly in chat.
- Send a Google Drive share link with your API key.The file must be shared as "Anyone with the link".
- Receive JSON with
file_url(the Telegram linkhttps://t.me/BOT?start=CODE, same value aslink) andsite_link(the same file on this site). - Show the
linkto your visitor. Opening it launches Telegram; pressing START begins delivery immediately.
Generate a link
POSTGET
https://tg.gdbazar.live/api/v1/generate.php| Parameter | Type | Description |
|---|---|---|
api_key | string, required | Your key from Studio → API keys. Can also be sent as the X-API-Key header. |
url | string, required | Google Drive file link, or just the file ID. |
Form fields, query string and a JSON body all work. If the same Drive file was submitted before, you get the existing link back with "existing": true — no duplicate is made.
curl -X POST "https://tg.gdbazar.live/api/v1/generate.php" \ -d "api_key=YOUR_API_KEY" \ --data-urlencode "url=https://drive.google.com/file/d/1AbCdEfGhIjKlMnOpQrStUvWxYz/view"
<?php
$res = file_get_contents('https://tg.gdbazar.live/api/v1/generate.php', false, stream_context_create(['http' => [
'method' => 'POST',
'header' => 'Content-Type: application/x-www-form-urlencoded',
'content' => http_build_query(['api_key' => 'YOUR_API_KEY', 'url' => 'https://drive.google.com/file/d/1AbCdEfGhIjKlMnOpQrStUvWxYz/view']),
]]));
$data = json_decode($res, true);
if ($data['ok']) { echo $data['link']; }import requests
r = requests.post("https://tg.gdbazar.live/api/v1/generate.php", data={
"api_key": "YOUR_API_KEY",
"url": "https://drive.google.com/file/d/1AbCdEfGhIjKlMnOpQrStUvWxYz/view",
})
data = r.json()
if data["ok"]:
print(data["link"])const r = await fetch("https://tg.gdbazar.live/api/v1/generate.php", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ api_key: "YOUR_API_KEY", url: "https://drive.google.com/file/d/1AbCdEfGhIjKlMnOpQrStUvWxYz/view" }),
});
const data = await r.json();
if (data.ok) console.log(data.link);Response 200
{
"ok": true,
"existing": false,
"code": "k7Qm2xPaV9tR4wBn8zXc",
"file_name": "Movie.2024.1080p.mkv",
"file_size": 1503238553,
"file_size_text": "1.4 GB",
"link": "https://t.me/gdbazarfiles_bot?start=k7Qm2xPaV9tR4wBn8zXc",
"file_url": "https://t.me/gdbazarfiles_bot?start=k7Qm2xPaV9tR4wBn8zXc",
"site_link": "https://tg.gdbazar.live/go.php?c=k7Qm2xPaV9tR4wBn8zXc",
"cached": false,
"created_at": "2026-12-05 06:30:00"
}Check a link
GET
https://tg.gdbazar.live/api/v1/status.php?api_key=YOUR_API_KEY&code=LINK_CODEReturns the same fields plus status (idle, processing, done, error), opens and deliveries.
Errors & limits
Errors return {"ok": false, "error": "..."} with an HTTP status.
| Status | Meaning |
|---|---|
400 | api_key or url missing |
401 | Invalid API key |
403 | API key is disabled |
413 | File is larger than Telegram allows |
422 | Not a Google Drive file link (or a folder link) |
429 | Rate limit exceeded — wait and retry (see Retry-After header) |
503 | Telegram bot not set up yet |
500 | Server error |
Each key has its own limit of requests per minute (default 30). Telegram file limit: ~2 GB (Local Bot API).
Contact the site owner to obtain an API key.