List All Tokens
POST
/resi/token/listAuthentication
Basic username/password authentication
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| status | string | Required | Filter tokens by status Validation: Must be "active", "expired", or "deleted" |
status
RequiredType:string
Description:
Filter tokens by status
Validation:
Must be "active", "expired", or "deleted"
Code Example
- NodeJS
- Python
- PHP
- Java
- C#
- cURL
- Javascript
- Go
const axios = require('axios');
const url = "https://api.unknownproxies.com/api/v1/resi/token/list";
const headers = {
"Authorization": "Basic dXNlcjpwYXNz",
"Content-Type": "application/json"
};
const data = {
"status": "active"
};
try {
const response = await axios.post(url, {
headers,
data
});
console.log(response.data);
} catch (error) {
console.error('Error:', error.response?.data || error.message);
}
import requests
import json
url = "https://api.unknownproxies.com/api/v1/resi/token/list"
headers = {
"Authorization": "Basic dXNlcjpwYXNz",
"Content-Type": "application/json"
}
data = {
"status": "active"
}
response = requests.post(
url,
headers=headers,
json=data
)
print(response.json())
<?php
$url = "https://api.unknownproxies.com/api/v1/resi/token/list";
$headers = [
"Authorization: Basic dXNlcjpwYXNz",
"Content-Type: application/json"
];
$data = {
"status": "active"
};
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
$response = curl_exec($ch);
curl_close($ch);
echo $response;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.URI;
import com.google.gson.Gson;
public class ApiClient {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
String url = "https://api.unknownproxies.com/api/v1/resi/token/list";
String auth = "Basic dXNlcjpwYXNz";
HttpRequest.Builder requestBuilder = HttpRequest.newBuilder()
.uri(URI.create(url))
.header("Authorization", auth)
.header("Content-Type", "application/json");
// Add request body if needed
String jsonBody = {
"status": "active"
};
HttpRequest request = requestBuilder
.post(HttpRequest.BodyPublishers.ofString(jsonBody))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}
using System;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
using System.Net.Http.Headers;
using Newtonsoft.Json;
public class Program
{
public static async Task Main()
{
using var client = new HttpClient();
var url = "https://api.unknownproxies.com/api/v1/resi/token/list";
// Set basic auth
var authToken = Convert.ToBase64String(Encoding.UTF8.GetBytes("user:pass"));
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Basic", authToken);
var data = new {
// Define your request object here
};
var json = JsonConvert.SerializeObject(data);
var content = new StringContent(json, Encoding.UTF8, "application/json");
var response = await client.postAsync(url, content);
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);
}
}
curl -X POST "https://api.unknownproxies.com/api/v1/resi/token/list" \
-H "Authorization: Basic dXNlcjpwYXNz" \
-H "Content-Type: application/json" \
-d '{
"status": "active"
}'
const response = await fetch("https://api.unknownproxies.com/api/v1/resi/token/list", {
method: "POST",
headers: {
"Authorization": "Basic dXNlcjpwYXNz",
"Content-Type": "application/json"
},
body: {
"status": "active"
}
});
const data = await response.json();
console.log(data);
package main
import (
"bytes"
"encoding/base64"
"encoding/json"
"fmt"
"io"
"net/http"
)
func main() {
url := "https://api.unknownproxies.com/api/v1/resi/token/list"
reqBody := `
{
"status": "active"
}
`
var body io.Reader
if reqBody != "" {
var buf bytes.Buffer
if err := json.Compact(&buf, []byte(reqBody)); err == nil {
body = bytes.NewBuffer(buf.Bytes())
} else {
body = bytes.NewBuffer([]byte(reqBody))
}
}
req, _ := http.NewRequest("POST", url, body)
token := base64.StdEncoding.EncodeToString([]byte("user:pass"))
req.Header.Set("Authorization", "Basic "+token)
req.Header.Set("Content-Type", "application/json")
resp, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
b, _ := io.ReadAll(resp.Body)
fmt.Println(string(b))
}
Response Example
[
{
"token": "zu8sBXS4gkh7",
"username": "kGyohRda",
"authType": "user",
"password": "bkXBberMQ7",
"durationHours": 750,
"status": "active",
"createdAt": 1752251968,
"updatedAt": 1754843968,
"dataUsage": 11574848653,
"dataLimit": 100000000000,
"allowedPools": ["us-s", "us-r", "tickets-us-s", "tickets-us-r", "ca-s", "ca-r", "gb-s", "gb-r"]
},
{
"token": "HG5zl2QURXJF",
"username": "newuser2",
"authType": "user",
"password": "newpass22",
"durationHours": 0,
"status": "active",
"createdAt": 1754286589,
"updatedAt": 1754342102,
"dataUsage": 20964502,
"dataLimit": 50000000000,
"allowedPools": []
}
]Status Filtering
You can filter tokens by three status types:
active- Tokens that are currently operational and can send trafficexpired- Tokens that have reached their dataLimit or exceeded their durationHoursdeleted- Tokens that were manually deactivated via the delete endpoint
Response Format
The endpoint returns an array of token objects (without usage statistics). Each token includes all standard fields from the Residential Token Schema.
Note
This endpoint does not include the usage array in the response. To get usage statistics for a specific token, use the Retrieve Residential Token endpoint with usage: true.
Related Operations
After listing your tokens, you can:
- Retrieve Residential Token - Get detailed information with usage stats for a specific token
- Modify Residential Token - Update settings for any active token
- Delete Residential Token - Deactivate tokens you no longer need
For complete details on all token fields, see the Residential Token Schema documentation.