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.

  1. Send a Google Drive share link with your API key.
    The file must be shared as "Anyone with the link".
  2. Receive JSON with file_url (the Telegram link https://t.me/BOT?start=CODE, same value as link) and site_link (the same file on this site).
  3. Show the link to your visitor. Opening it launches Telegram; pressing START begins delivery immediately.

Generate a link

POSTGEThttps://tg.gdbazar.live/api/v1/generate.php
ParameterTypeDescription
api_keystring, requiredYour key from Studio → API keys. Can also be sent as the X-API-Key header.
urlstring, requiredGoogle 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"

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

GEThttps://tg.gdbazar.live/api/v1/status.php?api_key=YOUR_API_KEY&code=LINK_CODE

Returns the same fields plus status (idle, processing, done, error), opens and deliveries.

Errors & limits

Errors return {"ok": false, "error": "..."} with an HTTP status.

StatusMeaning
400api_key or url missing
401Invalid API key
403API key is disabled
413File is larger than Telegram allows
422Not a Google Drive file link (or a folder link)
429Rate limit exceeded — wait and retry (see Retry-After header)
503Telegram bot not set up yet
500Server 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.