curl --request GET \
--url https://api.platform.soax.com/v1/proxy/packages/{package_id}/connection-string \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.platform.soax.com/v1/proxy/packages/{package_id}/connection-string"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.platform.soax.com/v1/proxy/packages/{package_id}/connection-string', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.platform.soax.com/v1/proxy/packages/{package_id}/connection-string",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.platform.soax.com/v1/proxy/packages/{package_id}/connection-string"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.platform.soax.com/v1/proxy/packages/{package_id}/connection-string")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.platform.soax.com/v1/proxy/packages/{package_id}/connection-string")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body[
{
"uri": "http://country-us-session-k3j9d8f2:aB3dE5fG7h@proxy.soax.com:1337",
"username": "country-us-session-k3j9d8f2",
"password": "aB3dE5fG7h",
"host": "proxy.soax.com",
"port": 1337
}
]{
"error": "Cannot specify both 'rotate-time' and 'rotate-requests' simultaneously."
}{
"detail": "Invalid API key"
}{
"detail": "Missing required scope: proxy:packages:read"
}{
"detail": "Package not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"error": "Rate limit exceeded: 5 per 1 second"
}Get connection strings
Build ready-to-use proxy connection strings for a package, with targeting and session rules encoded for you. The returned credentials are used against the proxy gateway (proxy.soax.com:1337) — not against this API.
Location parameters are validated against what the package can actually target: an unavailable country, region, city, ISP, ASN, or ZIP returns 400. region, city, isp, asn, and zip all require country to be set.
Rotation and error handling: rotate-time and rotate-requests are mutually exclusive; on-error=retry requires retries, and retries is only valid with on-error=retry; bind=node is incompatible with prefer=lookalike and on-error=replace. When any rotation/error/bind rule is used (or count > 1) and no session is given, a session ID is generated automatically; with count > 1 the session IDs are numbered so each connection string gets its own IP.
For packages using IP allowlist authentication, rules are encoded in the hostname (HTTPS only), username is empty, and password is null.
Requires the proxy:packages:read scope.
curl --request GET \
--url https://api.platform.soax.com/v1/proxy/packages/{package_id}/connection-string \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.platform.soax.com/v1/proxy/packages/{package_id}/connection-string"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.platform.soax.com/v1/proxy/packages/{package_id}/connection-string', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.platform.soax.com/v1/proxy/packages/{package_id}/connection-string",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.platform.soax.com/v1/proxy/packages/{package_id}/connection-string"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.platform.soax.com/v1/proxy/packages/{package_id}/connection-string")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.platform.soax.com/v1/proxy/packages/{package_id}/connection-string")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body[
{
"uri": "http://country-us-session-k3j9d8f2:aB3dE5fG7h@proxy.soax.com:1337",
"username": "country-us-session-k3j9d8f2",
"password": "aB3dE5fG7h",
"host": "proxy.soax.com",
"port": 1337
}
]{
"error": "Cannot specify both 'rotate-time' and 'rotate-requests' simultaneously."
}{
"detail": "Invalid API key"
}{
"detail": "Missing required scope: proxy:packages:read"
}{
"detail": "Package not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"error": "Rate limit exceeded: 5 per 1 second"
}Authorizations
API key secret (starts with s_live_). Create keys in the dashboard under Settings → API keys, or via POST /v1/api-keys/. Send it as Authorization: Bearer <secret>.
Path Parameters
The package's ID. To find it, open the package in Packages and expand the header, or call List packages.
^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$Query Parameters
Was this page helpful?