Skip to main content

Modify Token

Modifies a token with the provided parameters. At least one optional field must be provided.
PATCH/isp/token

Authentication

Basic user:pass authentication

Request Body

token
Required
Type:string
Description:

The token to modify

authType
Optional
Type:string
Description:

Authentication type: "user" or "ip"

Validation:

Must be "user" or "ip"

authenticatedIps
Optional
Type:array[string]
Description:

Array of IPv4 addresses for IP authentication. If not provided or if an empty array is provided when switching to IP auth, defaults to ["1.1.1.1"]. When switching authType from "user" to "ip" without providing authenticatedIps, the username and password fields are preserved.

Validation:

Each string must be a valid IPv4 address. Maximum 4 IP addresses 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)
proxyType
Optional
Type:string
Description:

Proxy type

Validation:

Must be "http" or "socks"

username
Optional
Type:string
Description:

Username for authentication

Validation:

4-12 alphanumeric characters

password
Optional
Type:string
Description:

Password for authentication

Validation:

4-12 alphanumeric characters

Code Example

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",
"password": "your-new-password-here"
};

try {
const response = await axios.patch(url, {
headers,
data
});
console.log(response.data);
} catch (error) {
console.error('Error:', error.response?.data || error.message);
}

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": "active",
  "createdAt": 1752251968,
  "updatedAt": 1754843968,
  "dataUsage": 11574848653,
  "region": "US",
  "product": "TICK",
  "quantity": 2
}

What Can Be Modified

You can modify the following aspects of an ISP token:

  • Auth Type (authType) - Switch between "user" (username/password) and "ip" (IP-based) authentication
  • Authenticated IPs (authenticatedIps) - Update the list of allowed IP addresses for IP authentication
  • Proxy Type (proxyType) - Switch between "http" and "socks" proxy protocols
  • Username (username) - Change the username for user authentication
  • Password (password) - Change the password for user authentication
Note

At least one optional field must be provided when modifying a token. Only tokens with status "active" can be modified. Tokens with status "processing" cannot be modified - please wait until the token status becomes "active" before attempting to modify it.

Proxy Type Modification

The proxy IPs only support the protocol specified by proxyType. "http" refers to HTTP/HTTPS requests, while "socks" refers to SOCKS5 requests. A set of proxies cannot support both HTTP and SOCKS simultaneously