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/query Priced in USDT, this interface checks whether the username meets the opening conditions.
POST https://web.apitrx.com/query TRX pricing, this interface checks whether the username meets the opening conditions.
Parameters
Parameters | Type | Description | Example |
---|---|---|---|
apikey | string | Apikey obtained by TG robot | 83928AFB-14A5-4878-A63D-128467830293 |
username | string | username | @premium |
Response
{
"code": 200,
"data": {
"username": "@preminum",
"nickname" : "nickname",
"photo": "https://cdn4.telesco.pe/file/OU8KQ2jdJXACQnww72fQKgo5LhLkQJKTF5Ct0U-dNxsK2iQ5B0xrqPe4yEHSxCKMaSLv4USObMMEta_It_QBzgh5jgErXBu0QR-i8YNKirlitB1TBxWCU7-M0K3o0mv2xmrZrWIejD_g4-Ss7fjr1Zj0r5z-8SA2bgAAdDM6gOlYNwJAzXtuxLLRPAodYrfFSe8F56f6csrNEO3tGPFLd6vFyZY-pJejK_skfPS5xyd53ilmTUTyVy7xBCBMX-_kBhfygfEY-tsMxQbIcs2D1UdHKtpllkce7hSdDPTpRyvZvMi2dhHIIRN8F_0viWa1woTdQrEDxQXLSSDZnw16RA.jpg",
},
"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.username | string | username | premium |
data.nickname | string | nickname | jack |
data.photo | string | photo | https://cdn4.telesco.pe... |
Code Example
import java.io.*;
import java.net.HttpURLConnection;
import java.net.URL;
import org.json.JSONObject;
public class PostRequestExample {
public static void main(String[] args) throws Exception {
URL url = new URL("https://gift.apitrx.com/query");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("POST");
conn.setRequestProperty("Content-Type", "application/json");
conn.setDoOutput(true);
JSONObject jsonInput = new JSONObject();
jsonInput.put("apikey", "83928AFB-14A5-4878-A63D-128467830293");
jsonInput.put("username", "premium");
try (OutputStream os = conn.getOutputStream()) {
byte[] input = jsonInput.toString().getBytes("utf-8");
os.write(input, 0, input.length);
}
InputStream is = conn.getInputStream();
BufferedReader br = new BufferedReader(new InputStreamReader(is, "utf-8"));
StringBuilder response = new StringBuilder();
String line;
while ((line = br.readLine()) != null) {
response.append(line.trim());
}
JSONObject jsonResponse = new JSONObject(response.toString());
System.out.println("Code: " + jsonResponse.getInt("code"));
System.out.println("Message: " + jsonResponse.getString("message"));
JSONObject data = jsonResponse.getJSONObject("data");
System.out.println("Username: " + data.getString("username"));
System.out.println("Photo: " + data.getString("photo"));
System.out.println("Nickname: " + data.getString("nickname"));
}
}
package main
import (
"bytes"
"encoding/json"
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://gift.apitrx.com/query"
payload := map[string]string{
"apikey": "83928AFB-14A5-4878-A63D-128467830293",
"username": "premium",
}
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 result struct {
Code int `json:"code"`
Message string `json:"message"`
Data struct {
Username string `json:"username"`
Photo string `json:"photo"`
Nickname string `json:"nickname"`
} `json:"data"`
}
json.Unmarshal(body, &result)
fmt.Println("Code:", result.Code)
fmt.Println("Message:", result.Message)
fmt.Println("Username:", result.Data.Username)
fmt.Println("Photo:", result.Data.Photo)
fmt.Println("Nickname:", result.Data.Nickname)
}
import requests
url = "https://gift.apitrx.com/query"
payload = {
"apikey": "83928AFB-14A5-4878-A63D-128467830293",
"username": "premium"
}
response = requests.post(url, json=payload)
data = response.json()
print("Code:", data['code'])
print("Message:", data['message'])
print("Username:", data['data']['username'])
print("Photo:", data['data']['photo'])
print("Nickname:", data['data']['nickname'])
<?php
<?php
$url = "https://gift.apitrx.com/query";
$data = [
"apikey" => "83928AFB-14A5-4878-A63D-128467830293",
"username" => "premium"
];
$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";
echo "Username: " . $result['data']['username'] . "\n";
echo "Photo: " . $result['data']['photo'] . "\n";
echo "Nickname: " . $result['data']['nickname'] . "\n";
?>
curl -X POST https://gift.apitrx.com/query \
-H "Content-Type: application/json" \
-d '{"apikey":"83928AFB-14A5-4878-A63D-128467830293","username":"premium"}'