Skip to content

res_proxy.php

Residential proxy management module for handling configuration creation, deletion, and retrieval of regional data and parameters.

API Methods

Method Action Description
create_config get configs Creates a new residential proxy configuration with specified country, protocol, and quantity.
delete_config get configs Deletes an existing proxy configuration.
get_cities get cities Retrieves a list of cities for a specific country and region.
get_configs get configs Retrieves a paginated list of proxy configurations belonging to the user.
get_params get params Retrieves available proxy parameters/options for the client.
get_regions get regions Retrieves a list of available regions for a specific country.
regenerate_config get configs Regenerates the session IDs for an existing proxy configuration.
update_config update configuration Updates an existing residential proxy configuration. Requires valid config_id and matching customer ownership.

res_proxy/create_config

Creates a new residential proxy configuration with specified country, protocol, and quantity.

HTTP method: POST

Parameters:

Parameter Required Type Description
action ✅ string Method identifier: create_config
token ✅ string Authentication token.
params[name] ✅ string Name of the configuration.
params[country] ✅ string Country code for the proxy.
params[protocol] ✅ string Proxy protocol to use.
params[count] ✅ integer Number of proxies. Allowed values: 1-500.
params[config_type] ✅ string Type of configuration.
params[region] ❌ string Specific region within the country.
params[city] ❌ string Specific city for the proxy.
show_by ✅ integer Pagination/Grouping parameter used to display results.
page ❌ integer Page number for pagination.
country ✅ string The country for the proxy configuration.
region ❌ string Specific region within the selected country.
name ✅ string The name assigned to the proxy configuration.
protocol ✅ string Communication protocol for the proxy connection.
count ✅ integer The number of proxies to be created in the configuration.
config_type ✅ string The type of proxy configuration being created.
city ❌ string Specific city for the proxy location.

Request example

curl -s "https://invapi.hostkey.com/res_proxy.php" -X POST \
--data "action=create_config" \
--data "token=HOSTKEY_TOKEN" \
--data "params[name]=VALUE" \
--data "params[country]=VALUE" \
--data "params[protocol]=VALUE" \
--data "params[count]=VALUE" \
--data "params[config_type]=VALUE" \
--data "show_by=1" \
--data "country=VALUE" \
--data "name=VALUE" \
--data "protocol=VALUE" \
--data "count=VALUE" \
--data "config_type=VALUE"
Success response example
{
"result": "OK",
"action": "create_config",
"data": []
}
Error examples
{
"code": -3,
"message": "res_proxy_not_enough_parameters"
}

res_proxy/delete_config

Deletes an existing proxy configuration.

HTTP method: POST

Parameters:

Parameter Required Type Description
action ✅ string Method identifier: delete_config
token ✅ string Authentication token.
params[config_id] ✅ integer ID of the configuration to delete.
show_by ✅ integer Pagination/Grouping parameter used to display results.
page ❌ integer Page number for pagination.
config_id ✅ integer Unique identifier of the configuration to be deleted.

Request example

curl -s "https://invapi.hostkey.com/res_proxy.php" -X POST \
--data "action=delete_config" \
--data "token=HOSTKEY_TOKEN" \
--data "params[config_id]=VALUE" \
--data "show_by=VALUE" \
--data "config_id=VALUE"
Success response example
{
"result": "OK",
"action": "delete_config",
"data": [
{
"id": 123,
"name": "Deleted Config",
"country": "GB",
"protocol": "socks5",
"quantity": 10,
"status": "deleted"
}
]
}
Error examples
{
"code": -3,
"message": "res_proxy_action_error"
}

res_proxy/get_cities

Retrieves a list of cities for a specific country and region.

HTTP method: POST

Parameters:

Parameter Required Type Description
action ✅ string Method identifier: get_cities
token ✅ string Authentication token.
country ✅ string Country code to filter cities.
region ❌ string Region code to filter cities.

Request example

curl -s "https://invapi.hostkey.com/res_proxy.php" -X POST \
--data "action=get_cities" \
--data "token=HOSTKEY_TOKEN" \
--data "country=US"
Success response example
{
"result": "OK",
"action": "get_cities",
"cities": [
{
"id": 1,
"name": "New York",
"code": "NY"
},
{
"id": 2,
"name": "Los Angeles",
"code": "LA"
}
]
}
Error examples
{
"code": -3,
"message": "res_proxy_empty_country"
}

res_proxy/get_configs

Retrieves a paginated list of proxy configurations belonging to the user.

HTTP method: POST

Parameters:

Parameter Required Type Description
action ✅ string Method identifier: get_configs
token ✅ string Authentication token.
show_by ✅ integer Pagination/Grouping parameter used to display results.
page ✅ integer Page number for pagination.

Request example

curl -s "https://invapi.hostkey.com/res_proxy.php" -X POST \
--data "action=get_configs" \
--data "token=HOSTKEY_TOKEN" \
--data "show_by=VALUE" \
--data "page=VALUE"
Success response example
{
"result": "OK",
"action": "get_configs",
"config_data": [
{
"id": 10,
"name": "Config 1",
"country": "DE",
"protocol": "http",
"quantity": 5,
"status": "active"
}
]
}
Error examples
{
"code": -3,
"message": "res_proxy_empty_country"
}

res_proxy/get_params

Retrieves available proxy parameters/options for the client.

HTTP method: POST

Parameters:

Parameter Required Type Description
action ✅ string Method identifier: get_params
token ✅ string Authentication token.
show_by ✅ integer Pagination/Grouping parameter used to display results.
page ✅ integer Page number for pagination.

Request example

curl -s "https://invapi.hostkey.com/res_proxy.php" -X POST \
--data "action=get_params" \
--data "token=HOSTKEY_TOKEN" \
--data "show_by=VALUE" \
--data "page=VALUE"
Success response example
{
"result": "OK",
"action": "get_params",
"params": [
{
"id": 1,
"name": "param_example",
"value": "val"
}
]
}
Error examples
{
"code": -3,
"message": "res_proxy_no_user"
}

res_proxy/get_regions

Retrieves a list of available regions for a specific country.

HTTP method: POST

Parameters:

Parameter Required Type Description
action ✅ string Method identifier: get_regions
token ✅ string Authentication token.
country ✅ string Country code to filter regions.

Request example

curl -s "https://invapi.hostkey.com/res_proxy.php" -X POST \
--data "action=get_regions" \
--data "token=HOSTKEY_TOKEN" \
--data "country=VALUE"
Success response example
{
"result": "OK",
"action": "get_regions",
"regions": [
{
"code": "US-CA",
"name": "California"
}
]
}
Error examples
{
"code": -3,
"message": "res_proxy_empty_country"
}

res_proxy/regenerate_config

Regenerates the session IDs for an existing proxy configuration.

HTTP method: POST

Parameters:

Parameter Required Type Description
action ✅ string Method identifier: regenerate_config
token ✅ string Authentication token.
params[config_id] ✅ integer ID of the configuration to regenerate.
config_id ✅ integer Unique identifier of the configuration to be regenerated.

Request example

curl -s "https://invapi.hostkey.com/res_proxy.php" -X POST \
--data "action=regenerate_config" \
--data "token=HOSTKEY_TOKEN" \
--data "params[config_id]=VALUE" \
--data "config_id=VALUE"
Success response example
{
"result": "OK",
"action": "regenerate_config",
"data": {
"session_ids": [
"1234567890",
"0987654321"
]
}
}
Error examples
{
"code": -3,
"message": "res_proxy_action_error"
}

res_proxy/update_config

Updates an existing residential proxy configuration. Requires valid config_id and matching customer ownership.

HTTP method: POST

Parameters:

Parameter Required Type Description
action ✅ string Method identifier: update_config
token ✅ string Authentication token for API access.
config_id ✅ integer The unique identifier of the configuration to update.
name ✅ string Name of the proxy configuration.
country ✅ string Country code for the proxies.
protocol ✅ string Proxy protocol to be used.
count ✅ integer Number of proxies in the configuration. Allowed values: 1 to 500.
config_type ✅ string Type of configuration mode.
page ✅ integer Pagination page number.
show_by ✅ integer Grouping/display parameter for the configuration list.
region ❌ string Specific region within the country.
city ❌ string Specific city for proxy location.

Request example

curl -s "https://invapi.hostkey.com/res_proxy.php" -X POST \
--data "action=update_config" \
--data "token=HOSTKEY_TOKEN" \
--data "config_id=VALUE" \
--data "name=VALUE" \
--data "country=VALUE" \
--data "protocol=VALUE" \
--data "count=VALUE" \
--data "config_type=VALUE" \
--data "page=VALUE" \
--data "show_by=VALUE" \
--data "region=VALUE" \
--data "city=VALUE"
Success response example
{
"result": "OK",
"action": "update_config",
"data": [
{
"id": 123,
"name": "My Proxy Config",
"country": "US",
"protocol": "http",
"quantity": 50,
"config_type": "standard",
"session_type": "sticky",
"session_ttl": 600,
"gate": 1
}
]
}
Error examples
{
"code": -3,
"message": "res_proxy_not_enough_parameters"
}
question_mark
Is there anything I can help you with?
question_mark
AI Assistant ×