Get port by reset token
GET
/tokens/{token}
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");curl_easy_setopt(hnd, CURLOPT_URL, "https://api.ltesocks.io/v2/tokens/example");
struct curl_slist *headers = NULL;headers = curl_slist_append(headers, "Authorization: Bearer <token>");curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);using System.Net.Http.Headers;var client = new HttpClient();var request = new HttpRequestMessage{ Method = HttpMethod.Get, RequestUri = new Uri("https://api.ltesocks.io/v2/tokens/example"), Headers = { { "Authorization", "Bearer <token>" }, },};using (var response = await client.SendAsync(request)){ response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body);}package main
import ( "fmt" "net/http" "io")
func main() {
url := "https://api.ltesocks.io/v2/tokens/example"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close() body, _ := io.ReadAll(res.Body)
fmt.Println(res) fmt.Println(string(body))
}HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("https://api.ltesocks.io/v2/tokens/example")) .header("Authorization", "Bearer <token>") .method("GET", HttpRequest.BodyPublishers.noBody()) .build();HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());System.out.println(response.body());OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder() .url("https://api.ltesocks.io/v2/tokens/example") .get() .addHeader("Authorization", "Bearer <token>") .build();
Response response = client.newCall(request).execute();import axios from 'axios';
const options = { method: 'GET', url: 'https://api.ltesocks.io/v2/tokens/example', headers: {Authorization: 'Bearer <token>'}};
try { const { data } = await axios.request(options); console.log(data);} catch (error) { console.error(error);}const url = 'https://api.ltesocks.io/v2/tokens/example';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}val client = OkHttpClient()
val request = Request.Builder() .url("https://api.ltesocks.io/v2/tokens/example") .get() .addHeader("Authorization", "Bearer <token>") .build()
val response = client.newCall(request).execute()use reqwest;
#[tokio::main]pub async fn main() { let url = "https://api.ltesocks.io/v2/tokens/example";
let mut headers = reqwest::header::HeaderMap::new(); headers.insert("Authorization", "Bearer <token>".parse().unwrap());
let client = reqwest::Client::new(); let response = client.get(url) .headers(headers) .send() .await;
let results = response.unwrap() .json::<serde_json::Value>() .await .unwrap();
dbg!(results);}curl --request GET \ --url https://api.ltesocks.io/v2/tokens/example \ --header 'Authorization: Bearer <token>'wget --quiet \ --method GET \ --header 'Authorization: Bearer <token>' \ --output-document \ - https://api.ltesocks.io/v2/tokens/exampleAuthorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”token
required
string
Responses
Section titled “Responses”Successful operation
Media typeapplication/json
object
port
Port number
string
ip
Port current IP address (0.0.0.0 if not available)
string
geoip
object
continentCode
string
continentName
string
countryCode2
string
countryCode3
string
stateProv
string
district
string
city
string
zipcode
string
latitude
string
longitude
string
isp
string
status
Port status
string
currentStatus
Current status
string
resetToken
Port reset token
string
signature
Port signature
string
vpnAccess
Indicates whether port has access to the VPN server
boolean
autoResetInterval
Port auto reset interval in seconds, 0 means disabled
integer
tags
Port tags
Array<string>
plan
object
id
Plan ID
string
name
Plan title
string
countryCode
Plan country code
string
enabled
Indicates whether plan is active
boolean
autoRenew
Indicates whether plan auto renewal is active
boolean
activatedAt
Plan activation time
string format: date-time
expiresAt
Plan expiration time
string format: date-time
trafficRemains
Remaining traffic amount in megabytes
integer
tarification
object
time
Plan duration time in seconds
integer
traffic
Plan traffic amount in megabytes
integer
price
Plan price in cents
integer
credentials
object
ip
Array<string>
password
Array<object>
object
login
string
password
string
Example
{ "port": 10000, "ip": "1.1.1.1", "geoip": { "continentCode": "NA", "continentName": "North America", "countryCode2": "US", "countryCode3": "United States", "latitude": "38.89037", "longitude": "-77.03196", "isp": "T-Mobile USA, Inc." }, "status": "active", "currentStatus": "active", "resetToken": "6015510d206e4d7b023e5f978a56e3cf49d7e79bc26cf28c69b75314e098a61b", "signature": "Windows", "vpnAccess": true, "plan": { "id": "5349b4ddd2781d08c09890f3", "name": "UK Three", "countryCode": "UK", "enabled": true, "autoRenew": true, "activatedAt": "2022-04-02T05:57:29.054Z", "expiresAt": "2022-05-02T05:57:29.054Z", "trafficRemains": 51200, "tarification": { "time": 2592000, "traffic": 51200, "price": 14500 } }, "credentials": { "ip": [ "2.2.2.2" ], "password": [ { "login": "login", "password": "password" } ] }}Error
Media typeapplication/json
object
error
required
Error text representation
string
code
required
Error code representation
integer
Example
{ "error": "example error", "code": 400}