Перейти до вмісту

Отримати порт за токеном скидання

GET
/tokens/{token}
curl --request GET \
--url https://api.ltesocks.io/v2/tokens/example \
--header 'Authorization: Bearer <token>'
token
обов’язково
string

Операцію виконано успішно

Тип вмістуapplication/json
object
port

Номер порту

string
ip

Поточна IP-адреса порту (0.0.0.0, якщо недоступна)

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

Статус порту

string
Допустимі значення: active reset suspended disconnected outoftraffic
currentStatus

Поточний статус

string
Допустимі значення: active declined
resetToken

Токен скидання порту

string
signature

Сигнатура порту

string
vpnAccess

Вказує, чи має порт доступ до VPN-сервера

boolean
autoResetInterval

Інтервал автоскидання порту в секундах; 0 вимикає автоскидання

integer
tags

Теги порту

Array<string>
<= 30 симв.
plan
object
id

ID тарифу

string
name

Назва тарифу

string
countryCode

Код країни тарифу

string
enabled

Вказує, чи активний тариф

boolean
autoRenew

Вказує, чи ввімкнене автопродовження тарифу

boolean
activatedAt

Час активації тарифу

string формат: date-time
expiresAt

Час завершення тарифу

string формат: date-time
trafficRemains

Залишок трафіку в мегабайтах

integer
tarification
object
time

Строк дії тарифу в секундах

integer
traffic

Обсяг трафіку тарифу в мегабайтах

integer
price

Ціна тарифу в центах

integer
credentials
object
ip
Array<string>
<= 20 симв.
password
Array<object>
<= 20 симв.
object
login
string
password
string
Приклад
{
"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"
}
]
}
}

Помилка

Тип вмістуapplication/json
object
error
обов’язково

Текст помилки

string
code
обов’язково

Код помилки

integer
Приклад
{
"error": "example error",
"code": 400
}