Proxy Detection Legacy Web Service
To learn more about the risk associated with a particular
IP address, use the
minFraud Score service.
This service provides the IP Risk Score, a replacement for the proxyScore. To
identify anonymous IP addresses in support of geotargeting and ad serving
environments, we recommend using the
GeoIP Anonymous IP database.
The proxy detection web service provides a score measuring the risk associated
with an IP address. It is called the IP risk score in our current minFraud
services.
Learn more about the IP risk score on our knowledge base.
Changes to the proxy detection web service are documented in our
release notes.
You may optionally include the
Device Tracking Add-On to help us identify the device
your customer is using to determine whether it has been used in previous
fraudulent transactions. The device information passed to MaxMind via the Device
Tracking Add-On is factored into the proxyScore returned when you query the HTTP
API.
This web service uses the same hostnames as our minFraud web
service. Its URI is https://minfraud.maxmind.com/app/ipauth_http
The minfraud.maxmind.com hostname automatically picks the data center
geographically closest to you.
The API is only available via HTTPS. If you attempt to access this service via
HTTP, you will receive a 403 Forbidden HTTP response.
We require TLS 1.2 or greater for all requests to our servers to keep your data
secure.
The API requires you to pass a set of parameters as an HTTP GET or POST. Results
are returned in a simple text format documented below.
The three parameters that this service takes are the IP address to look up, the
shopID and
your MaxMind license key.
The shopID is your internal ID for the shop, affiliate, or merchant this order
is coming from, and is required for customers who are resellers, payment
providers, gateways and affiliate networks.
The parameters should be passed in a query string or as a form post
(application/x-www-form-urlencoded). The IP address parameter should be named
i (lower case “I”), the shopID parameter should be named shopID and the
license key should be named l (lower case “L”).
The IP address should be passed as a string like “44.55.66.77”.
This service returns data as a set of comma-separated fields. The individual
fields are not escaped or quoted, but they will never contain a comma.
All strings are returned as ASCII.
| Name | Type (length) | Description |
|---|
| proxyScore | decimal | A score from 0.00-4.00 indicating the likelihood that the user's IP
address is an anonymous proxy, open proxy, or VPN.| proxyScore | Likelihood of fraud |
|---|
| 0.5 | 15% | | 1.0 | 30% | | 2.0 | 60% | | 3.0+ | 90% | A proxyScore of 0.00 will be returned for a corporate proxy or private
IP and an empty string will be returned for an invalid IP. |
| err | enum | If there was an error or warning with this request, this field
contains an error code string. The possible error codes are: PERMISSION_REQUIRED – You do not have permission to
use the service. Please
contact our support team
for more information.LICENSE_REQUIRED – You must provide a license key.INVALID_LICENSE_KEY – The license key provided is
invalid.MAX_REQUESTS_REACHED – This error will be returned if
your account is out of queries or if an invalid license key is
provided.
|
Below are some sample clients for this web service.
#!/usr/bin/env perl
use strict;
use warnings;
use Encode qw( decode );
use Getopt::Long;
use LWP::UserAgent;
use URI;
use URI::QueryParam;
my $license_key = 'YOUR_LICENSE_KEY';
my $ip_address = '24.24.24.24';
GetOptions(
'license:s' => \$license_key,
'ip:s' => \$ip_address,
);
my $uri = URI->new('https://minfraud.maxmind.com/app/ipauth_http');
$uri->query_param( l => $license_key );
$uri->query_param( i => $ip_address );
my $ua = LWP::UserAgent->new( timeout => 5 );
my $response = $ua->get($uri);
die 'Request failed with status ' . $response->code()
unless $response->is_success();
my %proxy = map { split /=/, $_ } split /;/, $response->content();
if ( defined $proxy{err} && length $proxy{err} ) {
die "MaxMind returned an error code for the request: $proxy{err}\n";
}
else {
print "\nMaxMind Proxy data for $ip_address\n\n";
for my $field ( sort keys %proxy ) {
print sprintf( " %-20s %s\n", $field, $proxy{$field} );
}
print "\n";
}
#!/usr/bin/env python
import argparse
import requests
import sys
parser = argparse.ArgumentParser(description='MaxMind Proxy Detection web service client')
parser.add_argument('--license', default='YOUR_LICENSE_KEY')
parser.add_argument('--ip', default='24.24.24.24')
args = parser.parse_args()
payload = {'l': args.license, 'i': args.ip};
response = requests.get('https://minfraud.maxmind.com/app/ipauth_http', params=payload)
if response.status_code != requests.codes.ok:
sys.stderr.write("Request failed with status %s\n" % response.status_code)
sys.exit(1)
proxy = dict( f.split('=') for f in response.text.split(';') )
if 'err' in proxy and len(proxy['err']):
sys.stderr.write("MaxMind returned an error code for the request: %s\n" % proxy['err'])
sys.exit(1)
else:
print "\nMaxMind Proxy data for %s\n\n" % args.ip
for (key, val) in proxy.items():
print " %-20s %s" % (key, val)
print "\n"
#!/usr/bin/php
<?php
$license_key = 'LICENSE_KEY_HERE';
$ipaddress = 'IP_ADDRESS_HERE';
$query = "https://minfraud.maxmind.com/app/ipauth_http?l=" . $license_key
. "&i=" . $ipaddress;
$score = file_get_contents($query);
echo $score;
Dim objHttp, strQuery
strQuery = "https://minfraud.maxmind.com/app/ipauth_http?l=" & license_key & _
"&i=" & ipaddress
set objHttp = Server.CreateObject("Msxml2.ServerXMLHTTP")
objHttp.open "GET", strQuery, false
objHttp.send
Response.Write objHttp.ResponseText
Set objHttp = Nothing