Reseller APIs
  • Reseller APIs
    • Oxylab
    • Geonode
    • Private
    • Packetstream
    • Bright Data
    • Smart
    • IP Royal
Powered by GitBook
On this page
  • How to generate sticky proxies:
  • How to generate rotating proxies:
  • Supported countries:
  • FAQ

Was this helpful?

  1. Reseller APIs

Private

This page will guide you on how to generate sticky and rotating proxies, Supported countries, other optional features, White labeling and FAQs regarding Private APIs.

PreviousGeonodeNextPacketstream

Last updated 2 years ago

Was this helpful?

API documentation:

Base Domain: 159.89.245.182:5500

How to generate sticky proxies:

const random_string = (length) => {
  var result = "";
  var characters = "abcdefghijklmnopqrstuvwxyz1234567890";
  var charactersLength = characters.length;
  for (var i = 0; i < length; i++) {
    result += characters.charAt(Math.floor(Math.random() * charactersLength));
  }
  return result;
};
 
function proxyGenerationSticky(amount, country, password) {
  proxy = [];
  const domain = "159.89.245.182**";**
  for (var i = 0; i < parseInt(amount); i++) {
    proxy.push(
      `${domain}:5500:country-${country.toLowerCase()}-session-${random_string(32)}:${password}\\n`
    );
  }
	return proxy.join("");
}

How to generate rotating proxies:

async function proxyGenerationRotating(amount, country, password) {
  proxy = [];
  const domain = "159.89.245.182**"**
  for (var i = 0; i < parseInt(amount); i++) {
    proxy.push(`${domain}:5500:country-${country.toLowerCase()}:${password}\\n`);
  }
  return proxy.join("");
}

Supported countries:

const premium_countries = {
    GB: { display: "United Kingdom" },
    SI: { display: "Slovenia" },
    IT: { display: "Italy" },
    FR: { display: "France" },
    LV: { display: "Latvia" },
    CZ: { display: "Czechia" },
    PH: { display: "Philippines" },
    MA: { display: "Morocco" },
    UG: { display: "Uganda" },
    RU: { display: "Russian Federation" },
    TR: { display: "Turkey" },
    TH: { display: "Thailand" },
    BD: { display: "Bangladesh" },
    ES: { display: "Spain" },
    MT: { display: "Malta" },
    GR: { display: "Greece" },
    VN: { display: "Viet Nam" },
    BF: { display: "Burkina Faso" },
    US: { display: "United States" },
    AL: { display: "Albania" },
    DZ: { display: "Algeria" },
    JP: { display: "Japan" },
    KE: { display: "Kenya" },
    HU: { display: "Hungary" },
    RO: { display: "Romania" },
    ID: { display: "Indonesia" },
    NG: { display: "Nigeria" },
    IN: { display: "India" },
    AF: { display: "Afghanistan" },
    CN: { display: "China" },
    LK: { display: "Sri Lanka" },
    CO: { display: "Colombia" },
    MX: { display: "Mexico" },
    RS: { display: "Serbia" },
    DO: { display: "Dominican Republic" },
    IE: { display: "Ireland" },
    IR: { display: "Iran, Islamic Republic of" },
    BR: { display: "Brazil" },
    EG: { display: "Egypt" },
    MV: { display: "Maldives" },
    UA: { display: "Ukraine" },
    CH: { display: "Switzerland" },
    MH: { display: "Marshall Islands" },
    PE: { display: "Peru" },
    TZ: { display: "Tanzania, United Republic of" },
    VE: { display: "Venezuela, Bolivarian Republic of" },
    AR: { display: "Argentina" },
    LY: { display: "Libya" },
    TW: { display: "Taiwan, Province of China" },
    HR: { display: "Croatia" },
    SE: { display: "Sweden" },
    BT: { display: "Bhutan" },
    NO: { display: "Norway" },
    PG: { display: "Papua New Guinea" },
    PT: { display: "Portugal" },
    YE: { display: "Yemen" },
    FI: { display: "Finland" },
    NP: { display: "Nepal" },
    NZ: { display: "New Zealand" },
    UY: { display: "Uruguay" },
    AO: { display: "Angola" },
    HN: { display: "Honduras" },
    IQ: { display: "Iraq" },
    NL: { display: "Netherlands" },
    PY: { display: "Paraguay" },
    SO: { display: "Somalia" },
    CF: { display: "Central African Republic" },
    SD: { display: "Sudan" },
    BI: { display: "Burundi" },
    DE: { display: "Germany" },
    KR: { display: "Korea, Republic of" },
    KZ: { display: "Kazakhstan" },
    MY: { display: "Malaysia" },
    PL: { display: "Poland" },
    PS: { display: "Palestine, State of" },
    CL: { display: "Chile" },
    CU: { display: "Cuba" },
    EE: { display: "Estonia" },
    SN: { display: "Senegal" },
    SV: { display: "El Salvador" },
    SY: { display: "Syrian Arab Republic" },
    UZ: { display: "Uzbekistan" },
    BE: { display: "Belgium" },
    CA: { display: "Canada" },
    NA: { display: "Namibia" },
    SA: { display: "Saudi Arabia" },
    BJ: { display: "Benin" },
    GE: { display: "Georgia" },
    JO: { display: "Jordan" },
    PA: { display: "Panama" },
    AM: { display: "Armenia" },
    BB: { display: "Barbados" },
    CG: { display: "Congo" },
    ET: { display: "Ethiopia" },
    KP: { display: "Korea, Democratic People's Republic of" },
    MZ: { display: "Mozambique" },
    WS: { display: "Samoa" },
    DM: { display: "Dominica" },
    LT: { display: "Lithuania" },
    SB: { display: "Solomon Islands" },
    SR: { display: "Suriname" },
    SS: { display: "South Sudan" },
    ZW: { display: "Zimbabwe" },
    AT: { display: "Austria" },
    BW: { display: "Botswana" },
    GA: { display: "Gabon" },
    IS: { display: "Iceland" },
    OM: { display: "Oman" },
    SM: { display: "San Marino" },
    ZA: { display: "South Africa" },
    ZM: { display: "Zambia" },
    AG: { display: "Antigua and Barbuda" },
    AU: { display: "Australia" },
    KG: { display: "Kyrgyzstan" },
    LB: { display: "Lebanon" },
    PK: { display: "Pakistan" },
    SK: { display: "Slovakia" },
    AE: { display: "United Arab Emirates" },
    BY: { display: "Belarus" },
    CR: { display: "Costa Rica" },
    QA: { display: "Qatar" },
    BZ: { display: "Belize" },
    CY: { display: "Cyprus" },
    IL: { display: "Israel" },
    KW: { display: "Kuwait" },
    MG: { display: "Madagascar" },
    TM: { display: "Turkmenistan" },
    BH: { display: "Bahrain" },
    DK: { display: "Denmark" },
    FJ: { display: "Fiji" },
    SG: { display: "Singapore" },
    TG: { display: "Togo" },
    TO: { display: "Tonga" },
    BN: { display: "Brunei Darussalam" },
    GL: { display: "Greenland" },
    SL: { display: "Sierra Leone" },
    SZ: { display: "Eswatini" },
    KI: { display: "Kiribati" },
    KM: { display: "Comoros" },
    LU: { display: "Luxembourg" },
    TJ: { display: "Tajikistan" },
    HK: { display: "Hong Kong" },
  }

White labeling

Use this method to brand your proxies with your own domain/comapny name

To brand the proxies under your domain follow these steps:

  1. Open the DNS configuration for your domain.

  2. Create a A Name Record pointing to the domain {159.89.245.182}.

  3. Whatever you enter in 'host' will decide the domain which points to our API IP.

  4. An example on Godaddy is linked below:

FAQ

  • What is Authorization?

This is a header value you provide with every request. We are using Bearer token so send in the header like this: "Authorization: Bearer <your api token>"

  • Im getting this error: {"message":"user_id cannot be null or undefined.","timestamp":1634146275996} how do I fix it?

Make sure you have this "Content-Type": "application/json" header present in your requests.

Headers

Please check on how to send requests with headers in whichever languages you are using.

POST Request:

{
	"Authorization": "Bearer <your api token>",
	"Content-Type": "application/json"
} 
# Sample curl request
curl --location --request POST '<https://premium.proxiesapi.xyz/proxy_api/v1/premium/users/add_balance>' \\
         --data-raw '{
         "user_id": "f2f27683-04f8-4a84-bf23-2dfa29b6b6ec",
         "data_gb": 0.1
     }' -H "Authorization: Bearer <your api token>" -H "Content-Type: application/json"

GET Request:

{
	"Authorization": "Bearer <your api token>",
}
# Sample curl request
curl --location --request GET '<https://premium.proxiesapi.xyz/proxy_api/v1/premium/users/092fe926-9c52-4b72-92b4-6f0a84bd7f69>' \\
          -H "Authorization: Bearer <your api token>"

Thus if your domain is and you enter the host premium pointing to the oxylabs domain, your proxies will be formatted :port:user:pass

https://torchlabs.readme.io/
API.com
premium.yourdomain.com