API Endpoints
Access Instructions
The Telegarm Premium order query interfaces both provide two URLs, Please search the query based on the corresponding URL when you activate the service.
GET https://gift.apitrx.com/premiumstatus Priced in USDT, Check Premium orders
GET https://web.apitrx.com/premiumstatus TRX pricing, Check Premium orders
Parameters
Parameters | Type | Description | Example |
---|---|---|---|
orderId | string | orderID | 202505110900376496 |
Response
{
"code": 200,
"data": {
"orderId": "202505110900376496",
"username": "@preminum",
"nickname" : "nickname",
"month" : "3",
"status" : 1,
"remark" : "Successfully",
"amount" : 12.5,
"balance" : 87.5,
"timestamp": 1749907784113
},
"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 |
data.timestamp | int | order timestamp | 1749907784113 |
代码示例
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLEncoder;
public class HttpGetWithParameters {
public static void main(String[] args) {
try {
// 设置要访问的URL
String baseUrl = "https://gift.apitrx.com/premiumstatus";
// 设置参数
String orderId = "202505110900376496";
// 构建带参数的URL
String urlWithParams = baseUrl + "?" +
"orderId=" + URLEncoder.encode(orderId, "UTF-8")
// 创建URL对象
URL obj = new URL(urlWithParams);
// 打开连接
HttpURLConnection connection = (HttpURLConnection) obj.openConnection();
// 设置请求方式为GET
connection.setRequestMethod("GET");
// 获取响应码
int responseCode = connection.getResponseCode();
System.out.println("Response Code: " + responseCode);
// 读取响应内容
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuilder response = new StringBuilder();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
// 关闭连接
in.close();
// 打印响应内容
System.out.println("Response Content: " + response.toString());
} catch (IOException e) {
e.printStackTrace();
}
}
}
package main
import (
"fmt"
"net/http"
"net/url"
)
func sendGetRequest() {
// 设置要访问的URL
baseURL := "https://gift.apitrx.com/premiumstatus"
// 设置参数
params := url.Values{}
params.Add("orderId", "202505110900376496")
// 构建带参数的URL
urlWithParams := baseURL + "?" + params.Encode()
// 发送GET请求
response, err := http.Get(urlWithParams)
if err != nil {
fmt.Println("Error:", err)
return
}
defer response.Body.Close()
// 读取响应内容
body, err := io.ReadAll(response.Body)
if err != nil {
fmt.Println("Error reading response:", err)
return
}
// 打印响应内容
fmt.Println("Response Code:", response.Status)
fmt.Println("Response Content:", string(body))
}
func main() {
sendGetRequest()
}
import requests
def send_get_request():
# 设置要访问的URL
url = "https://gift.apitrx.com/premiumstatus"
# 设置参数
params = {
'orderId': '202505110900376496'
}
# 发送GET请求
response = requests.get(url, params=params)
# 打印响应信息
print("Response Code:", response.status_code)
print("Response Content:", response.text)
if __name__ == "__main__":
send_get_request()
<?php
// 设置要访问的URL
$url = 'https://gift.apitrx.com/premiumstatus';
// 设置参数
$orderId = '202505110900376496';
// 构建带参数的URL
$params = [
'orderId' => $orderId
];
$urlWithParams = $url . '?' . http_build_query($params);
// 发送GET请求并获取响应内容
$response = file_get_contents($urlWithParams);
// 打印响应内容
echo $response;
?>
curl --location 'https://gift.apitrx.com/premiumstatus?orderId=202505110900376496'