Search...
Menu

API Tutorial

API document:https://proxy302.apifox.cn/doc-3846532

Before using the API, you need to first apply for API key in Proxy302 dashboard.


Apply for API Key

Log in to Proxy302. Select 【API V2】 from the left sidebar, then click 【API-Key】. Enter the API-Key Name (you can customize it as you like) then click 【add】.
  • Note: Password is randomly generated by the system

User

Get Token

1.Pass the API-Key Name and Password (obtained by API V2) to get a token.
 
2.Click "Send" to call the interface. The response returns: 200, indicating the Token is successfully obtained.
Note: The Token is used to be filled in the Headers parameter Authorization of other requests to call the API.
  • Response example:
"code": 0,
"msg": "success",
"data": {
"token": "Basic cHveHkzMDI6THV1*******JiYQ"
 

Get Userinfo

1.Enter the generated Token into Headers - parameter Authorization.
  • Parameter value:Basic cHveHkzMDI6THV1*******JiYQ
2.Click "Send" to call the interface. The response returns: 200, indicating that user information is successfully obtained.
  • Response example:
"name": "Proxy302",
"email": "luna@proxy302.com",
"is_use": 1,
"uid": 1**1
 

Proxy

Static Traffic

1.Create static IP - Pay by Traffic

(1)Set the relevant parameters in the Params section.

protocol:http or socks5 protocol (Based on your needs)

is_data_center:0 residential;1 data_center

country_id:233 US(obtained via the Get Area Code interface)

  • example: static IP - Pay by Traffic;static_residential;HTTP;us
(2)Enter the generated Token into Headers - parameter Authorization.
  • Parameter value:Basic cHveHkzMDI6THV1*******JiYQ
2.Click "Send" to call the interface. The response returns: 200, indicating the proxy is successfully generated.
  • Response example:
"token_id": 25****78,
"ip": "198.***.**.24",
"host": "proxy.proxy302.com",
"port": 2222,
"user_name": "7x*****D",
"password": "mpqM*********0sf",
"protocol": "http"
 

Static IP

1.Create static IP - Pay by IP

(1)Set the relevant parameters in the Params section.

payway_id:91 Purchase a 1-day static residential proxy.(obtained via Get Payment Code

is_auto_renew:0 No;1 Yes

protocol:http or socks5 protocol (Based on your needs)

is_data_center:0 residential;1 data_center

country_id:233 US( obtained via the Get Area Code

  • example: static IP - Pay by IP;Purchase 1 day;Automatic Renewal;static_residential;HTTP;us
 
(2)Enter the generated Token into Headers - parameter Authorization.
  • Parameter value:Basic cHveHkzMDI6THV1*******JiYQ
2..Click "Send" to call the interface. The response returns: 200, indicating the proxy is successfully generated.
  • Response example:
"token_id": 25****1,
"ip": "194.**.***.03",
"host": "proxy.proxy302.com",
"port": 2222,
"user_name": "B******8J",
"password": "ylX********4O4D37",
"protocol": "http"
 

Dynamic Traffic

1..Create Dynamic Traffic - Pay by Traffic

(1)Set the relevant parameters in the Params section.

s:1 Enterprise Premier Route-Node 1;2 Enterprise Premier Route-Node 2;3 Smart Budget Route-Node 1;4 Smart Budget Route-Node 2

country_id:233 US(obtained via the Get Area Code

  • example:Create Dynamic Traffic - Pay by Traffic;Node 1;us
(2)Enter the generated Token into Headers - parameter Authorization.
  • Parameter value:Basic cHveHkzMDI6THV1*******JiYQ
2.Click "Send" to call the interface. The response returns: 200, indicating the proxy is successfully generated
  • Response example:
"token_id": 25****0,
"ip": "-",
"host": "proxy.proxy302.com",
"port": 2222,
"user_name": "Yn*****Q",
"password": "XC********QtT",
"protocol": "http"
 
 

Dynamic IP

1.Create Dynamic Traffic - Pay by IP

(1)Set the relevant parameters in the Params section.

protocol:http or socks5 protocol (Based on your needs)

country_id:233 US(obtained via the Get Area Code

  • example:Dynamic Traffic - Pay by IP;HTTP;us
(2)Enter the generated Token into Headers - parameter Authorization.
  • Parameter value:Basic cHveHkzMDI6THV1*******JiYQ
2.Click "Send" to call the interface. The response returns: 200, indicating the proxy is successfully generated
  • Response example:
"token_id": 25****6,
"ip": "-",
"host": "proxy.proxy302.com",
"port": 2222,
"user_name": "sg*****fW",
"password": "0Y8U********rR",
"protocol": "http"
 

Othes

Get Area Code

1、Click Get Area Code to obtain the area code, click Debug, and set the relevant parameters in Params; enter the Token into the request parameter Headers - parameter name Authorization.

(1)①Get country id:

area_type:country ;state ;city (Select one parameter to fill in)

pid:Parent ID, state, and city are required (No need to fill in to get country id)

name:Region Name (Support fuzzy search)

  • Example 1: get country id; united states
②Click "Send" to call the interface. The response returns: 200, indicating that country-id is successfully generated.
  • Response example:
"id": 233,
"name": "United States",
"code": "US"
 

(2)①Get state id:

area_type:country ;state ;city (Select one parameter to fill in)

pid:Parent ID, state, and city are required

name:Region Name (Support fuzzy search)

  • Example 2: get state id; Colorado (us)
 
②Click "Send" to call the interface. The response returns: 200, indicating that state-id is successfully generated.
  • Response example:
"id": 1450,
"name": "Colorado",
"code": "CO"
 

Get Payment Code

1、Click to obtain the payment method code via Get Payment Code, click Debug, and set the relevant parameters in Params.
payway_name:static_residential ;static_data_center ;
  • example:static_residential
 
2、Enter the generated Token into Headers - parameter Authorization.
  • Parameter value:Basic cHveHkzMDI6THV1*******JiYQ
 
3、Click "Send" to call the interface. The response returns: 200, indicating the payment method code is successfully generated.
  • Response example:
"id": 80,
"name": "Purchase a 1-month static residential proxy",
"en_name": "buy 1 month residential static proxy"
 
"id": 91,
"name": "Purchase a 1-day static residential proxy",
"en_name": "buy 1 day residential static proxy"
 
Previous
Remote PC-Connection Tutorial
Next
Proxy Type
Last modified: 2025-04-16