API Endpoints
Access Instructions
The Telegarm Premium Проверьте имя пользователя and Подписаться на Premium interfaces both provide two URLs, supporting payment via USDT or TRX.
The subdomain gift is priced in USDT, please go to https://t.me/GiftAPIBot to obtain an ApiKey (recommended).
The subdomain web is priced in TRX based on real-time exchange rates, please go to https://t.me/XXTrxBot to obtain an ApiKey.
Choose one method according to your needs and preload the balance in the corresponding bot.
POST https://gift.apitrx.com/premium Priced in USDT, Subscribe to Premium API
POST https://web.apitrx.com/premium TRX pricing, Subscribe to Premium API
Parameters
Parameters | Type | Description | Example |
---|---|---|---|
apikey | string | Apikey obtained by TG robot | 83928AFB-14A5-4878-A63D-128467830293 |
username | string | username | The format can be @username, username or https//t.me/username |
month | string | Months of subscription | 3, 6, 12 currently only supports 3 months, 6 months, 12 months |
Response
{
"code": 200,
"data": {
"orderId": "202505110900376496",
"username": "@preminum",
"nickname" : "nickname",
"month" : "3",
"status" : 1,
"remark" : "Successfully",
"amount" : 12.5,
"balance" : 87.5,
},
"message": "SUCCESS"
}
Parameters | Type | Description | Example |
---|---|---|---|
code | int | 200 is success, everything else is failure | 200/4xx/5xx |
message | string | Prompt message | SUCCESS/ERROR |
data.orderId | string | Order ID | 202505110900376496 |
data.username | string | Username | premium |
data.nickname | string | Nickname | jack |
data.month | string | Subscription Duration | 3 |
data.status | int | Activation Status | 0 activating 1 activated 2 activation failed |
data.remark | string | Remark | Activation successful |
data.amount | float | Consumption Amount | 12.5 |
data.balance | float | Balance | 87.5 |
Code Example
import java.io.*;
import java.net.HttpURLConnection;
import java.net.URL;
import org.json.JSONObject;
public class PostJsonRequest {
public static void main(String[] args) throws Exception {
URL url = new URL("https://gift.apitrx.com/premium");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("POST");
conn.setRequestProperty("Content-Type", "application/json");
conn.setDoOutput(true);
JSONObject json = new JSONObject();
json.put("apikey", "83928AFB-14A5-4878-A63D-128467830293");
json.put("username", "premium");
json.put("month", "3");
try (OutputStream os = conn.getOutputStream()) {
os.write(json.toString().getBytes("utf-8"));
}
BufferedReader br = new BufferedReader(new InputStreamReader(conn.getInputStream(), "utf-8"));
StringBuilder sb = new StringBuilder();
String line;
while ((line = br.readLine()) != null) sb.append(line);
JSONObject res = new JSONObject(sb.toString());
JSONObject data = res.getJSONObject("data");
System.out.println("Code: " + res.getInt("code"));
System.out.println("Message: " + res.getString("message"));
System.out.println("Order ID: " + data.getString("orderId"));
System.out.println("Username: " + data.getString("username"));
System.out.println("Nickname: " + data.getString("nickname"));
System.out.println("Month: " + data.getString("month"));
System.out.println("Remark: " + data.getString("remark"));
System.out.println("Status: " + data.getInt("status"));
System.out.println("Balance: " + data.getDouble("balance"));
System.out.println("Amount: " + data.getDouble("amount"));
}
}
package main
import (
"bytes"
"encoding/json"
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://gift.apitrx.com/premium"
payload := map[string]string{
"apikey": "83928AFB-14A5-4878-A63D-128467830293",
"username": "premium",
"month": "3",
}
jsonData, _ := json.Marshal(payload)
resp, err := http.Post(url, "application/json", bytes.NewBuffer(jsonData))
if err != nil {
panic(err)
}
defer resp.Body.Close()
body, _ := ioutil.ReadAll(resp.Body)
var res struct {
Code int64 `json:"code"`
Message string `json:"message"`
Data struct {
OrderID string `json:"orderId"`
Username string `json:"username"`
Nickname string `json:"nickname"`
Month string `json:"month"`
Remark string `json:"remark"`
Status int64 `json:"status"`
Balance float64 `json:"balance"`
Amount float64 `json:"amount"`
} `json:"data"`
}
json.Unmarshal(body, &res)
fmt.Println("Code:", res.Code)
fmt.Println("Message:", res.Message)
fmt.Println("Order ID:", res.Data.OrderID)
fmt.Println("Username:", res.Data.Username)
fmt.Println("Nickname:", res.Data.Nickname)
fmt.Println("Month:", res.Data.Month)
fmt.Println("Remark:", res.Data.Remark)
fmt.Println("Status:", res.Data.Status)
fmt.Println("Balance:", res.Data.Balance)
fmt.Println("Amount:", res.Data.Amount)
}
import requests
url = "https://gift.apitrx.com/premium"
payload = {
"apikey": "83928AFB-14A5-4878-A63D-128467830293",
"username": "premium",
"month": "3"
}
response = requests.post(url, json=payload)
res = response.json()
data = res["data"]
print("Code:", res["code"])
print("Message:", res["message"])
print("Order ID:", data["orderId"])
print("Username:", data["username"])
print("Nickname:", data["nickname"])
print("Month:", data["month"])
print("Remark:", data["remark"])
print("Status:", data["status"])
print("Balance:", data["balance"])
print("Amount:", data["amount"])
<?php
$url = "https://gift.apitrx.com/premium";
$data = [
"apikey" => "83928AFB-14A5-4878-A63D-128467830293",
"username" => "premium",
"month" => "3"
];
$options = [
"http" => [
"header" => "Content-Type: application/json\r\n",
"method" => "POST",
"content" => json_encode($data)
]
];
$context = stream_context_create($options);
$response = file_get_contents($url, false, $context);
$result = json_decode($response, true);
echo "Code: " . $result["code"] . "\n";
echo "Message: " . $result["message"] . "\n";
$data = $result["data"];
echo "Order ID: " . $data["orderId"] . "\n";
echo "Username: " . $data["username"] . "\n";
echo "Nickname: " . $data["nickname"] . "\n";
echo "Month: " . $data["month"] . "\n";
echo "Remark: " . $data["remark"] . "\n";
echo "Status: " . $data["status"] . "\n";
echo "Balance: " . $data["balance"] . "\n";
echo "Amount: " . $data["amount"] . "\n";
?>
curl -s -X POST https://gift.apitrx.com/premium \
-H "Content-Type: application/json" \
-d '{"apikey":"83928AFB-14A5-4878-A63D-128467830293","username":"premium","month":"3"}'