Skip to content

Proxies

SDK Reference · Resource

Proxies

Generate ready-to-use proxy credentials for an active order.

method

generate()

Generate proxy credentials

Creates ready-to-use proxy credentials for a purchased package. Use targeting to choose a location or provider scope, connection to choose protocol and output format, and session to control sticky session lifetime. Omit connection.host to choose one random eligible gateway for the entire request. The default port comes from that gateway's cluster. Targeting location does not select the entry gateway's region. Explicit host and port remain supported for custom endpoints.

Signature

Promiseclient.proxies.generate(options: ProxiesGenerateOptions): Promise<ProxiesGenerateResponse>

Parameters

NameTypeRequirementDescription
acceptLanguagestringOptionalPreferred language for human-readable API errors. Supported languages: en, ru, uk, de, it, fr, es, zh-hans, ja. Regional language tags and quality weights are accepted; unsupported or omitted values use English.
bodyGenerateProxyRequestRequired—

Example

const result = await client.proxies.generate({
body: {
"package_id": "550e8400-e29b-41d4-a716-446655440000",
"quantity": 1
}
});

Returns

GenerateProxyResponse

The resource or action result was created successfully.

typeGenerateProxyResponse2fields
count
number
Required
—
proxies
GeneratedProxy[]
Required
—
typeGeneratedProxy6fields
host
string
Required
—
port
number
Required
—
protocol
string
Required
—
username
string
Required
—
password
string
Required
—
connection_string
string
Required
—

Throws

ApiError

Normalized API, transport, and response processing failure.

  • kind: "validation"The request arguments or business rules are invalid.
  • kind: "authentication"Authentication credentials are missing, expired, or invalid.
  • kind: "permission"The authenticated account cannot perform this operation.
  • kind: "not_found"The requested resource does not exist.
  • kind: "network"The request could not reach ProxyRequest.
  • kind: "unexpected"The response could not be decoded or did not match the SDK contract.
Advanced variants
  • client.proxies.generateWithResponse(options): Promise<ApiResponse<ProxiesGenerateResponse>>

    Returns response status, headers, ETag and idempotency metadata with the decoded data.