Create Token
Check available inventory using the Get Stock endpoint to see available products and regions.
/isp/token/createAuthentication
Basic user:pass authentication
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| username | string | Optional | Only required if authType is "user". Username for proxy authentication Validation: 4-12 alphanumeric characters |
| password | string | Optional | Only required if authType is "user". Password for proxy authentication Validation: 4-12 alphanumeric characters |
| quantity | integer | Required | Number of tokens to create. For subnet products (products ending with "_24"), quantity must be exactly 254. Validation: 1-254. Must be exactly 254 for subnet products (products ending with "_24") |
| proxyType | string | Required | Proxy type Validation: Must be "http" or "socks" |
| product | string | Required | Product identifier. Product codes should never include the region prefix (e.g., use "TICK" not "US-TICK"). The region is specified separately via the region parameter. Subnet products end with "_24" and require quantity to be exactly 254. Validation: Example: "TICK". The product must exist and have available stock in the specified region. Check available products using GET /isp/stock before creating tokens. Subnet products (ending with "_24") require quantity=254. |
| region | string | Required | Region identifier. This is separate from the product code. Validation: Must be "US", "EU", "AS", or "AU" |
| authType | string | Required | Authentication type Validation: Must be "user" or "ip" |
| authenticatedIps | array[string] | Optional | Only required if authType is "ip". Array of IPv4 addresses for IP authentication. If not provided or if an empty array is provided, defaults to ["1.1.1.1"]. Validation: Each string must be a valid IPv4 address. Maximum 4 IP addresses allowed. Duplicate IP addresses are not allowed. Empty arrays are accepted and will default to ["1.1.1.1"]. Default: ["1.1.1.1"] (if authType is "ip" and authenticatedIps is not provided or is an empty array) |
username
OptionalOnly required if authType is "user". Username for proxy authentication
4-12 alphanumeric characters
password
OptionalOnly required if authType is "user". Password for proxy authentication
4-12 alphanumeric characters
quantity
RequiredNumber of tokens to create. For subnet products (products ending with "_24"), quantity must be exactly 254.
1-254. Must be exactly 254 for subnet products (products ending with "_24")
proxyType
RequiredProxy type
Must be "http" or "socks"
product
RequiredProduct identifier. Product codes should never include the region prefix (e.g., use "TICK" not "US-TICK"). The region is specified separately via the region parameter. Subnet products end with "_24" and require quantity to be exactly 254.
Example: "TICK". The product must exist and have available stock in the specified region. Check available products using GET /isp/stock before creating tokens. Subnet products (ending with "_24") require quantity=254.
region
RequiredRegion identifier. This is separate from the product code.
Must be "US", "EU", "AS", or "AU"
authType
RequiredAuthentication type
Must be "user" or "ip"
authenticatedIps
OptionalOnly required if authType is "ip". Array of IPv4 addresses for IP authentication. If not provided or if an empty array is provided, defaults to ["1.1.1.1"].
Each string must be a valid IPv4 address. Maximum 4 IP addresses allowed. Duplicate IP addresses are not allowed. Empty arrays are accepted and will default to ["1.1.1.1"].
Code Example
- NodeJS
- Python
- PHP
- Java
- C#
- cURL
- Javascript
- Go
const axios = require('axios');
const url = "https://api.unknownproxies.com/api/v1/isp/token/create";
const headers = {
"Authorization": "Basic dXNlcjpwYXNz",
"Content-Type": "application/json"
};
const data = {
"username": "your-username-here",
"password": "your-password-here",
"quantity": 1,
"proxyType": "http",
"product": "TICK",
"region": "US",
"authType": "user",
"authenticatedIps": ["1.1.1.1", "2.2.2.2"]
};
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/isp/token/create"
headers = {
"Authorization": "Basic dXNlcjpwYXNz",
"Content-Type": "application/json"
}
data = {
"username": "your-username-here",
"password": "your-password-here",
"quantity": 1,
"proxyType": "http",
"product": "TICK",
"region": "US",
"authType": "user",
"authenticatedIps": ["1.1.1.1", "2.2.2.2"]
}
response = requests.post(
url,
headers=headers,
json=data
)
print(response.json())
<?php
$url = "https://api.unknownproxies.com/api/v1/isp/token/create";
$headers = [
"Authorization: Basic dXNlcjpwYXNz",
"Content-Type: application/json"
];
$data = {
"username": "your-username-here",
"password": "your-password-here",
"quantity": 1,
"proxyType": "http",
"product": "TICK",
"region": "US",
"authType": "user",
"authenticatedIps": ["1.1.1.1", "2.2.2.2"]
};
$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/isp/token/create";
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 = {
"username": "your-username-here",
"password": "your-password-here",
"quantity": 1,
"proxyType": "http",
"product": "TICK",
"region": "US",
"authType": "user",
"authenticatedIps": ["1.1.1.1", "2.2.2.2"]
};
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/isp/token/create";
// 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/isp/token/create" \
-H "Authorization: Basic dXNlcjpwYXNz" \
-H "Content-Type: application/json" \
-d '{
"username": "your-username-here",
"password": "your-password-here",
"quantity": 1,
"proxyType": "http",
"product": "TICK",
"region": "US",
"authType": "user",
"authenticatedIps": ["1.1.1.1", "2.2.2.2"]
}'
const response = await fetch("https://api.unknownproxies.com/api/v1/isp/token/create", {
method: "POST",
headers: {
"Authorization": "Basic dXNlcjpwYXNz",
"Content-Type": "application/json"
},
body: {
"username": "your-username-here",
"password": "your-password-here",
"quantity": 1,
"proxyType": "http",
"product": "TICK",
"region": "US",
"authType": "user",
"authenticatedIps": ["1.1.1.1", "2.2.2.2"]
}
});
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/create"
reqBody := `
{
"username": "your-username-here",
"password": "your-password-here",
"quantity": 1,
"proxyType": "http",
"product": "TICK",
"region": "US",
"authType": "user",
"authenticatedIps": ["1.1.1.1", "2.2.2.2"]
}
`
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": "kGyohRdaGo",
"authType": "user",
"password": "bkXBberMQ7",
"proxyType": "http",
"authenticatedIps": [],
"proxies": [
"123.123.123.123:12345",
"123.123.111.111:8888"
],
"durationHours": 720,
"status": "processing",
"createdAt": 1752251968,
"updatedAt": 1752251968,
"dataUsage": 0,
"region": "US",
"product": "TICK",
"quantity": 2
}After Creating a Token
Once your token is created, you can:
- Retrieve Token - Get detailed information about your token
- Modify Token - Update authentication or proxy settings
- Renew Token - Extend the token duration before it expires
For complete details on all token fields, see the ISP Token Schema documentation.