dove logo

Contents

language instance

Curl

Java

Php

Get API Key

API request method:http get/post

Configurable parameters:

admin:Dove website account username (required)

pwd:Dove website account password (required)

Request a connection:https://dvapi.doveproxy.net/cmapi.php?rq=login&user=admin&password=pwd

The request returns successfully:
{
  "errno": 200,
  "msg": "Success",
  "data": {
    "token": "O12314141414155ZKckd2Vml0SVArUT09"
  }
}

Note: token is API Key, which is valid for a long time

Return error reference
200:Success
800:Account has been banned
801:User does not exist
802:Incorrect username/password
803:Username and password cannot be empty

Get UserInfo

API request method:http get/post

Configurable parameters:

admin:Dove website account username (required)

kon:Dove website API Key (required)

Request a connection:https://dvapi.doveproxy.net/cmapi.php?rq=getUserInfo&user=admin&token=kon

The request returns successfully:
{
  "errno": 200,
  "msg": "Success",
  "data": {
    "username": "gaozy",
    "points_now": "99599",  // {} User's current gold coins
    "sys_group_id": "VIP1",  //user level
    "cellphone": "13521192700",
    "email": "[email protected]"
  }
}

Return errno reference
200:Success
801:User does not exist
803:Username and password cannot be empty

Get Proxy IP

API request method:http get/post

Configurable parameters:
user:Dove website account username (required)
token:Dove website API Key (required)
geo:Country geo code (required)【Click to view the country code table】
city:city code 【Click to view the city code table】
accurate:IP acquisition method (required) (the default configuration is 0, 0 is to obtain according to the geo parameter; 1 is to obtain the similar ip according to the geographic location of the selfip parameter)
selfip:Fill in the reference ip (can be left blank when accurate is 0, required when accurate is 1)
timeout:Valid time (optional, in minutes, the default configuration is 10 minutes, can be configured between 1-35minutes)
auth:Authentication mode (default is 0, 0 is IP whitelist authentication, 1 is user password authentication)
agreement:Proxy protocol (default configuration is 0, 0 is Socks5 protocol proxy, 1 is HTTP protocol proxy)
repeat:The duplicate ip can be obtained within 24 hours (the default configuration is 0, 0 is not to obtain duplicate ip, 1 is to obtain duplicate ip)
num:Get the number of IPs (optional, the default is 1, up to 10 can be obtained at one time)
type_ip:Protocol type (optional, leave it to get no matter which one, input 1 to get IPv4, 2 to get IPv6)

Whitelist authentication method to request connection:https://dvapi.doveproxy.net/cmapi.php?rq=distribute&user=admin&token=O12314141414155ZKckd2Vml0SVArUT09&auth=0&geo=BJ&city=426939&agreement=0&timeout=10&num=2&type_ip=1

Whitelist authentication method (requesting a single IP) returns:
{
  "errno": 200,
  "msg": "Success",
  "data": {
    "geo": "mx", //{}Country
    "ip": "47.253.12.97", //proxy ip
    "port": 40076, //proxy port
    "d_ip": "201.162.169.86" //target ip
    "timeout": 600 //Effective time (seconds)
  }
}

Whitelist authentication method (requesting multiple IPs) returns:
{
  "errno": 200,
  "msg": "Success",
  "data": [{
    "geo": "mx", //{}Country
    "ip": "47.253.12.97", //proxy ip
    "port": 40076, //proxy port
    "d_ip": "201.162.169.86" //target ip
    "timeout": 600 //Effective time (seconds)
},{
    "geo": "mx", //{}Country
    "ip": "47.253.12.97", //proxy ip
    "port": 40076, //proxy port
    "d_ip": "201.162.169.86" //target ip
    "timeout": 600 //Effective time (seconds)
  }]
}

Username authentication method to request connection:https://dvapi.doveproxy.net/cmapi.php?rq=distribute&user=admin&token=O12314141414155ZKckd2Vml0SVArUT09&auth=1&geo=BJ&city=426939&agreement=0&timeout=10&num=2

Username authentication method (requesting a single IP) returns:
{
  "errno": 200,
  "msg": "Success",
  "data": {
    "geo": "mx", //{}Country
    "ip": "47.253.12.97", //proxy ip
    "port": 40076, //proxy port
    "d_ip": "201.162.169.86" //target ip
    "timeout": 600 //Effective time (seconds)
    "username": "zhansan" //Your username
    "password": "1asfadqdax" //Your password
  } }

Username authentication method (requesting multiple IPs) returns:
{
  "errno": 200,
  "msg": "Success",
  "data": [{
    "geo": "mx", //{}Country
    "ip": "47.253.12.97", //proxy ip
    "port": 40076, //proxy port
    "d_ip": "201.162.169.86" //target ip
    "timeout": 600 //Effective time (seconds)
    "username": "zhangsan" //Your username
    "password": "1asfadqdax" //Your password
},{
    "geo": "mx", //{}Country
    "ip": "47.253.12.97", //proxy ip
    "port": 40076, //proxy port
    "d_ip": "201.162.169.86" //target ip
    "timeout": 600 //Effective time (seconds)
    "username": "zhansan" //Your username
    "password": "2asfadqdax" //Your password
  }] }

Return errno reference
200:Success
800:Account has been banned
801:User does not exist
802:Incorrect username/password
803:Username and password cannot be empty
902:Incorrect parameter
903:Invalid country code
904:Invalid type
906:IP list is empty
403:Insufficient account balance
408:selfip cannot be empty
409:The frequency of requesting IP is too high, please try again later
500:The IP token has been created, please get it from a new one
400:Failure, system error
Note: The proxy IP obtained by IP whitelist authentication is used by the local public IP when obtaining the proxy IP and the IP in the whitelist. Use the command line window to view the public IP: curl cip.cc

Curl

1.get token

curl -d "user=abcd&password=abcd" https://dvapi.doveproxy.net/cmapi.php?rq=login

{"errno":200,"msg":"Success","data":{"token":"OXhRbHd2MHVvaWZKckd2Vml0SVArUT09"}}

2.get proxy ip

curl -ipv4 -d "user=abc&token=OXhRbHd2MHVvaWZKckd2Vml0SVArUT09&geo=mx" https://dvapi.doveproxy.net/cmapi.php?rq=distribute

{"errno":200,"msg":"Success","data":{"geo":"mx","ip":"47.253.12.97","port":40004,"d_ip":"189.203.105.247"}}

3.used proxy ip

curl -ipv4 --socks5 47.253.12.97:40004 https://www.google.com

Java

import java.io.ByteArrayOutputStream;
	import java.io.IOException;
	import java.io.InputStream;
	import java.io.OutputStream;
	import java.net.HttpURLConnection;
	import java.net.InetSocketAddress;
	import java.net.MalformedURLException;
	import java.net.Proxy;
	import java.net.URL;


	public class Demo {

		public static void main(String[] args) {
		System.setProperty("java.net.preferIPv4Stack", "true");//Set jvm to use ipv4 network first
			String uname = "test";
			String upass = "test";

			//1
			String token = login(uname, upass);

			//2
			ProxyBean proxy = getProxyIp(uname, token);

			//3
			usedProxyIp(proxy.proxy_ip,proxy.proxy_port);

		}



		//step 1,get token by used login api
		public static String login(String uname, String upass) {

			String params = "user=" + uname + "&password=" + upass;
			String reqUrl = "https://dvapi.doveproxy.net/cmapi.php?rq=login";
			try {

				HttpURLConnection httpURLConnection = getUrlConnection(reqUrl);

				OutputStream out = httpURLConnection.getOutputStream();
				out.write(params.getBytes());
				out.flush();
				out.close();

				String msg = "";
				int code = httpURLConnection.getResponseCode();
				System.out.println("code:" + code);
				if (code == 200) {

					msg = getConnectionResult(httpURLConnection);

					System.out.println("msg:" + msg);
					//{"errno":200,"msg":"Success","data":{"token":"OXhRbHd2MHVvaWZKckd2Vml0SVArUT09"}}

					JSONObject jo =  JSONObject.parseObject(msg);
					int errno = jo.getIntValue("errno");
					jo = jo.getJSONObject("data");
					String token = jo.getString("token");

					System.out.println("errno:" + errno);
					System.out.println("token:" + token);

					return token;
				}
			} catch (IOException e) {
				e.printStackTrace();
			} catch (JSONException e) {
				e.printStackTrace();
			}

			return null;
		}

		//step 2,get proxy ip by api
		public static ProxyBean getProxyIp(String uname, String token) {

			String params = "geo=mx&user=" + uname + "&token=" + token;
			String reqUrl = "https://dvapi.doveproxy.net/cmapi.php?rq=distribute";
			try {

				HttpURLConnection httpURLConnection = getUrlConnection(reqUrl);

				OutputStream out = httpURLConnection.getOutputStream();
				out.write(params.getBytes());
				out.flush();
				out.close();

				String msg = "";
				int code = httpURLConnection.getResponseCode();
				System.out.println("code:" + code);
				if (code == 200) {
					msg = getConnectionResult(httpURLConnection);
				}
				//{"errno":200,"msg":"Success","data":{"geo":"mx","ip":"47.253.12.97","port":40004,"d_ip":"189.203.105.247"}}
				System.out.println("msg:" + msg);
				JSONObject jo = JSONObject.parseObject(msg);
				int errno = jo.getIntValue("errno");
				jo = jo.getJSONObject("data");
				String geo = jo.getString("geo");
				String ip = jo.getString("ip");
				int port = jo.getInteger("port");
				String d_ip = jo.getString("d_ip");

				System.out.println("errno:" + errno);
				System.out.println("geo:" + geo);
				System.out.println("ip:" + ip);
				System.out.println("port:" + port);
				System.out.println("d_ip:" + d_ip);

				ProxyBean proxy = new ProxyBean();
				proxy.proxy_ip = ip;
				proxy.proxy_port = port;

				return proxy;

			} catch (IOException e) {
				e.printStackTrace();
			}catch (JSONException e) {
				e.printStackTrace();
			}

			return null;
		}


		//step 3,used proxy ip
		public static void usedProxyIp(String proxyIp, int proxyPort) {

			try {
				InetSocketAddress inetSocketAddress = new InetSocketAddress(proxyIp, proxyPort);
				Proxy proxy = new Proxy(Proxy.Type.SOCKS, inetSocketAddress);
				URL url = new URL("https://www.google.com");
				HttpURLConnection httpURLConnection = (HttpURLConnection) url.openConnection(proxy);
				httpURLConnection.setRequestMethod("GET");
				httpURLConnection.setRequestProperty("User-Agent", "Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; DigExt)");
				httpURLConnection.setConnectTimeout(3000);
				httpURLConnection.setDoOutput(true);
				httpURLConnection.setDoInput(true);
				httpURLConnection.connect();
				int code = httpURLConnection.getResponseCode();
				System.out.println("code:" + code);
				if (code == 200) {
					String content = getConnectionResult(httpURLConnection);

				System.out.println("content:" + content);
				}
			} catch (MalformedURLException e) {

				e.printStackTrace();
			} catch (IOException e) {

				e.printStackTrace();
			}

		}

		public static class ProxyBean{

			public String proxy_ip;
			public int proxy_port;
		}


		public static String getConnectionResult(HttpURLConnection httpURLConnection) throws IOException {

			InputStream inStream = httpURLConnection.getInputStream();
			ByteArrayOutputStream outStream = new ByteArrayOutputStream();
			byte[] buffer = new byte[512];
			int length = -1;
			String msg;
			while ((length = inStream.read(buffer)) != -1) {
				outStream.write(buffer, 0, length);
			}

			outStream.close();
			inStream.close();
			msg = outStream.toString();

			return msg;
		}

		public static HttpURLConnection getUrlConnection(String reqUrl) throws IOException {

			URL url = new URL(reqUrl);
			HttpURLConnection httpURLConnection = (HttpURLConnection) url.openConnection();
			httpURLConnection.setRequestMethod("POST");
			httpURLConnection.setRequestProperty("User-Agent", "Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; DigExt)");
			httpURLConnection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
			httpURLConnection.setConnectTimeout(3000);
			httpURLConnection.setDoOutput(true);
			httpURLConnection.setDoInput(true);
			httpURLConnection.connect();
			return httpURLConnection;
		}
	}

Php

//Note: Please install the curl extension and use curl to request if you need to use PHP.
	function curl($uri)
	{
		$curl = curl_init();
		curl_setopt($curl, CURLOPT_URL, $uri);
		curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
		curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 1);
		curl_setopt($curl, CURLOPT_TIMEOUT, 3);
		curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);
		$response = curl_exec($curl);
		curl_close($curl);
		return $response;
	}

	//1.get token

	$login = curl("https://dvapi.doveproxy.net/cmapi.php?rq=login&user=abc&password=123456");

	//{"errno":200,"msg":"Success","data":{"token":"OXhRbHd2MHVvaWZKckd2Vml0SVArUT09"}}

	//2.get proxy ip

	$login = json_decode($login,true);
	$login = $login['data'];
	$proxy = curl("https://dvapi.doveproxy.net/cmapi.php?rq=distribute&user=abc&token=".$login['token']."&geo=mx");
	//{"errno":200,"msg":"Success","data":{"geo":"mx","ip":"47.253.12.97","port":40004,"d_ip":"189.203.105.247"}}

	//3.used proxy ip

	$proxy = json_decode($proxy,true);
	$proxy = $proxy['data'];
	$ch = curl_init();
	curl_setopt ($ch, CURLOPT_URL, "https://www.google.com");
	curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
	curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, 60);
	curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
	curl_setopt($ch, CURLOPT_PROXYAUTH, CURLAUTH_BASIC);
	curl_setopt($ch, CURLOPT_PROXY, $proxy['ip']);//Proxy ip
	curl_setopt($ch, CURLOPT_PROXYPORT, $proxy['port']);//Proxy port
	curl_setopt($ch, CURLOPT_PROXYTYPE, CURLPROXY_HTTP);
	curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
	curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);

	$curlScrapedPage = curl_exec($ch);
	curl_close($ch);

	echo $curlScrapedPage;