BuyTgPremium

Telegram Premium and Stars API

Send Telegram Premium and Telegram Stars gifts from your own app, bot or shop. A small REST API with JSON, one API key, and orders paid from your credit at the same prices as the site.

Getting started

  • Create an account and add credit on the Credit page.
  • Open My account, then API, and create your API key. It is shown once, so store it on your server.
  • Send the key in the X-Api-Key header with every request.

Base URL and format

All requests use HTTPS and JSON. A success answers { "ok": true, "data": ... }. An error answers { "ok": false, "error": { "code", "message" } } with a stable code.

https://buytgpremium.com/api/v1

curl https://buytgpremium.com/api/v1/balance \
  -H "X-Api-Key: btk_YOUR_KEY"

{ "ok": true, "data": { "credit": "120.00", "currency": "USD" } }

Endpoints

MethodPathWhat it does
GET/balanceYour credit in USD
GET/productsPremium durations and prices, Stars range and packages
GET/recipient?username=Checks a username: person, channel, group, bot or not found
POST/quotePrice of an order and whether your credit covers it
POST/ordersPlaces a gift order paid from credit
GET/orders?limit=&batch=Your recent orders (up to 100)
GET/orders/{code}One order by its code

Placing an order

Premium: product "premium", months 3, 6 or 12, and up to 10 usernames in recipients. Stars: product "stars", stars from 3,500 to 550,000, and one username in recipient. The total is taken from your credit at once and one order is made per recipient.

curl -X POST https://buytgpremium.com/api/v1/orders \
  -H "X-Api-Key: btk_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"product":"premium","months":12,"recipients":["alice","bob"]}'

{ "ok": true, "data": { "batch": "B-7KQ2-...", "total": "34.00", "currency": "USD",
  "orders": [ { "code": "G-4MZ8-...", "product": "premium", "recipient": "alice", "months": 12,
    "price": "17.00", "status": "completed" }, ... ] } }
curl -X POST https://buytgpremium.com/api/v1/orders \
  -H "X-Api-Key: btk_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"product":"stars","stars":5000,"recipient":"alice"}'

Error codes

CodeMeaning
missing_api_key / invalid_api_keyNo key, or the key is wrong or was replaced (401)
invalid_input / invalid_recipientCheck the product, months, stars or username (400)
recipient_not_userThe username is a channel, group or bot, or does not exist
insufficient_creditCredit is lower than the order total; add credit
network_errorTemporary network error; your credit has not changed, try again
rate_limitedOver 120 requests a minute per key (429, see Retry-After)

Limits and safety

  • 120 requests a minute per key; 60 recipient checks per 10 minutes.
  • One key per account. Replacing it stops the old key at once.
  • Keep the key on your server. Never put it in a web page or a mobile app.
Telegram Premium and Stars API for Resellers and Bots | BuyTgPremium