The API is available at:
https://api.ltesocks.io/v2All public operations require an API token. Create one in Dashboard → Settings → Profile → API Token, then keep it in a secret manager or environment variable.
export LTESOCKS_API_TOKEN="replace-with-your-token"curl --request GET \ --url "https://api.ltesocks.io/v2/user" \ --header "Accept: application/json" \ --header "Accept-Language: en" \ --header "Authorization: Bearer ${LTESOCKS_API_TOKEN}"JavaScript
Section titled “JavaScript”const response = await fetch('https://api.ltesocks.io/v2/user', { headers: { Accept: 'application/json', 'Accept-Language': 'en', Authorization: `Bearer ${process.env.LTESOCKS_API_TOKEN}`, },});
if (!response.ok) { const problem = await response.json(); throw new Error(problem.error ?? `HTTP ${response.status}`);}
const user = await response.json();console.log(user.login);Python
Section titled “Python”import osimport requests
response = requests.get( "https://api.ltesocks.io/v2/user", headers={ "Accept": "application/json", "Accept-Language": "en", "Authorization": f"Bearer {os.environ['LTESOCKS_API_TOKEN']}", }, timeout=30,)response.raise_for_status()print(response.json()["login"])<?php
$token = getenv('LTESOCKS_API_TOKEN');$request = curl_init('https://api.ltesocks.io/v2/user');
curl_setopt_array($request, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_HTTPHEADER => [ 'Accept: application/json', 'Accept-Language: en', "Authorization: Bearer {$token}", ], CURLOPT_TIMEOUT => 30,]);
$body = curl_exec($request);$status = curl_getinfo($request, CURLINFO_RESPONSE_CODE);curl_close($request);
if ($status < 200 || $status >= 300) { throw new RuntimeException("LTESocks API returned HTTP {$status}: {$body}");}
$user = json_decode($body, true, flags: JSON_THROW_ON_ERROR);echo $user['login'];Next steps
Section titled “Next steps”- Read authentication before storing the token in production.
- Learn the request and response conventions.
- Discover plans, servers, and signatures.
- Follow the mobile port lifecycle.