This API is used for new https://createproxy.com/auth/ Auth Management Tool, this new Tool allow you to create and delete credentials for any of your Merchant or Cloud Proxies. Basically you can create / delete Login by USERNAME:PASSWORD or IP Address credentials for your Proxy and it will work! This method allow your system basically create and remove credentials for your proxies automatically.
Name | Requirements | Options | |
---|---|---|---|
api_key | string|required | Get your api key from https://createproxy.com/dashboard/api | |
category_id | numeric | This is optional, you can define category_id, so only credentials in this category will be returned. | |
auth_type | numeric | This is optional, it can be 0 or not set to return all, if you want to filter credentials you may define 1 as HTTP IPV4, 2 as SOCKS5, 3 HTTP IPV6, 4 FTP and 5 POP3. | |
service | string | This is optional, allowed values are: all,merchant,cloud |
// Read more at https://www.createproxy.com/api/auth/list_credentials/
// createproxy.class.php is available on GitHub: https://github.com/Coxii/CreateProxy
require_once "createproxy.class.php";
$client = new CreateProxyClient('REPLACE_WITH_YOUR_API_KEY');
$params = array();
$params['category_id'] = "0"; // This is optional, you can define category_id, so only credentials in this category will be returned.
$params['auth_type'] = "0"; // This is optional, it can be 0 or not set to return all, if you want to filter credentials you may define 1 as HTTP IPV4, 2 as SOCKS5, 3 HTTP IPV6, 4 FTP and 5 POP3.
$params['service'] = "all"; // This is optional, allowed values are: all,merchant,cloud
try {
$request = $client->request('auth','list_credentials',$params);
} catch(CreateProxyException $e) {
print_r($e->getMessage());
exit;
}
echo '<pre>';
print_r($request);
echo '</pre>';
// CreateProxy API end
<!-- Read more at https://www.createproxy.com/api/auth/list_credentials/ -->
$api_url = "https://www.createproxy.com/api/request/auth/list_credentials/";
$params = array();
$params['api_key'] = "REPLACE_WITH_YOUR_API_KEY"; // Get your api key from https://createproxy.com/dashboard/api
$params['category_id'] = "0"; // This is optional, you can define category_id, so only credentials in this category will be returned.
$params['auth_type'] = "0"; // This is optional, it can be 0 or not set to return all, if you want to filter credentials you may define 1 as HTTP IPV4, 2 as SOCKS5, 3 HTTP IPV6, 4 FTP and 5 POP3.
$params['service'] = "all"; // This is optional, allowed values are: all,merchant,cloud
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "$api_url");
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($params));
curl_setopt($ch, CURLOPT_REFERER, $_SERVER['SERVER_NAME']);
curl_setopt($ch, CURLOPT_AUTOREFERER, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch,CURLOPT_ENCODING,"gzip,deflate");
$result=curl_exec($ch);
curl_close($ch);
if($result === false) {
die("Failed to perform request");
}
$response = json_decode($result, true);
if(!$response) {
die('CreateProxy responded with invalid response');
} else if(!isset($response['type'])) {
die('CreateProxy responded with incorrect status key');
} else if($response['type'] == 'error') {
if(isset($response['title']) AND isset($response['message'])) {
die($response['title']. ': ' . $response['message']);
} else if(isset($response['message'])){
die('API ERROR: ' . $response['message']);
} else {
die('API UNDEFINNED ERROR');
}
}
echo '<pre>';
print_r($response);
echo '</pre>';
<!-- CreateProxy API end -->
// read more at https://www.createproxy.com/api/auth/list_credentials/
using System;
using System.Diagnostics;
using System.Net;
using System.IO;
class Program
{
static void Main(string[] args)
{
string api_key = "REPLACE_WITH_YOUR_API_KEY";
string category_id = "0";
string auth_type = "0";
string service = "all";
string serviceUri = "https://www.createproxy.com/api/request/auth/list_credentials/";
string post_data = "api_key=" + api_key + "category_id=" + category_id + "auth_type=" + auth_type + "service=" + service;
// create a request
HttpWebRequest request = (HttpWebRequest)
WebRequest.Create(serviceUri);
request.Method = "POST";
// turn our request string into a byte stream
byte[] postBytes = System.Text.Encoding.ASCII.GetBytes(post_data);
// this is important - make sure you specify type this way
request.ContentType = "application/x-www-form-urlencoded";
request.ContentLength = postBytes.Length;
Stream requestStream = request.GetRequestStream();
// now send it
requestStream.Write(postBytes, 0, postBytes.Length);
requestStream.Close();
// grab te response and print it out to the console
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
Console.WriteLine(new StreamReader(response.GetResponseStream()).ReadToEnd());
Console.ReadLine();
}
}
curl -X POST -F 'api_key=REPLACE_WITH_YOUR_API_KEY' -F 'category_id=0' -F 'auth_type=0' -F 'service=all' https://www.createproxy.com/api/request/auth/list_credentials/
import requests
files = {
'api_key': (None, 'REPLACE_WITH_YOUR_API_KEY'),
'category_id': (None, '0'),
'auth_type': (None, '0'),
'service': (None, 'all'),
}
response = requests.post('https://www.createproxy.com/api/request/auth/list_credentials/', files=files)