Delete Token
DELETE
/isp/tokenAuthentication
Basic user:pass authentication
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| token | string | Required | The token to deactivate (delete) |
token
RequiredType:string
Description:
The token to deactivate (delete)
Code Example
- NodeJS
- Python
- PHP
- Java
- C#
- cURL
- Javascript
- Go
const axios = require('axios');
const url = "https://api.unknownproxies.com/api/v1/isp/token";
const headers = {
"Authorization": "Basic dXNlcjpwYXNz",
"Content-Type": "application/json"
};
const data = {
"token": "your-token-here"
};
try {
const response = await axios.delete(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/isp/token"
headers = {
"Authorization": "Basic dXNlcjpwYXNz",
"Content-Type": "application/json"
}
data = {
"token": "your-token-here"
}
response = requests.delete(
url,
headers=headers,
json=data
)
print(response.json())
<?php
$url = "https://api.unknownproxies.com/api/v1/isp/token";
$headers = [
"Authorization: Basic dXNlcjpwYXNz",
"Content-Type: application/json"
];
$data = {
"token": "your-token-here"
};
$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, "DELETE");
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/isp/token";
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 = {
"token": "your-token-here"
};
HttpRequest request = requestBuilder
.delete(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/isp/token";
// 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.deleteAsync(url, content);
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);
}
}
curl -X DELETE "https://api.unknownproxies.com/api/v1/isp/token" \
-H "Authorization: Basic dXNlcjpwYXNz" \
-H "Content-Type: application/json" \
-d '{
"token": "your-token-here"
}'
const response = await fetch("https://api.unknownproxies.com/api/v1/isp/token", {
method: "DELETE",
headers: {
"Authorization": "Basic dXNlcjpwYXNz",
"Content-Type": "application/json"
},
body: {
"token": "your-token-here"
}
});
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/isp/token"
reqBody := `
{
"token": "your-token-here"
}
`
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("DELETE", 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
{
"message": "success"
}Important Information
Irreversible Action
Deleting a token is permanent and cannot be undone. Only tokens with status "active" can be deleted. Tokens with status "processing" cannot be deleted - please wait until the token status becomes "active" before attempting to delete it. The token status will be set to "deleted" and the proxies will no longer be accessible.
What Happens When You Delete a Token
- The token status is immediately set to
"deleted" - The token can no longer authenticate or send traffic
- The token data remains in the system for record-keeping purposes
- You can still retrieve the deleted token information using the Retrieve Token endpoint
Before Deleting
- Retrieve Token - Review token details before deletion
- List All Tokens - View all deleted tokens by filtering with
status: "deleted"