IPQS
Login History API

About the Login History API

The IPQS Login History API provides detailed insights into recent and historical login events and authentication attempts on your IPQS account, enabling you to track unauthorized access attempts, detect suspicious activity, and conduct thorough security audits. By integrating this solution, you gain improved visibility into account authentication patterns, enhance compliance with cybersecurity standards, and reduce the risk of account compromise through monitoring, analytics, and actionable data.

Note

The Login History API is not currently enabled for all customers. To opt-in to this API, reach out to our Support team.

API Request URLs

JSON

https://www.ipqualityscore.com/api/json/loginhistory/YOUR_API_KEY_HERE

XML

https://www.ipqualityscore.com/api/xml/loginhistory/YOUR_API_KEY_HERE

Example Response

This is an example success response in JSON format. Responses are also available in XML format.

{'message': 'Success', 'success': True, 'login_logs': [
        {'ID': '31656582', 'UserID': '123456', 'IP': '192.0.2.55', 'Hostname': 'syn-096-041-136-092.res.spectrum.com', 'Browser': 'Mozilla/5.0', 'FraudScore': '7.00', 'CountryCode': 'US', 'OrgISP': 'Spectrum', 'LoginSuccess': True, 'Validated': True, 'Deleted': False, 'Genesis': {'date': '2024-07-11 10: 35: 25.000000', 'timezone_type': 3, 'timezone': 'America/New_York'
            }
        },
        {'ID': '36206472', 'UserID': '123456', 'IP': '192.0.2.55', 'Hostname': 'syn-047-224-131-099.res.spectrum.com', 'Browser': 'Mozilla/5.0', 'FraudScore': '7.00', 'CountryCode': 'US', 'OrgISP': 'Spectrum', 'LoginSuccess': True, 'Validated': True, 'Deleted': False, 'Genesis': {'date': '2024-07-11 10: 35: 25.000000', 'timezone_type': 3, 'timezone': 'America/New_York'
            }
        },
        {'ID': '42275562', 'UserID': '123456', 'IP': '192.0.2.55', 'Hostname': 'syn-047-224-131-099.res.spectrum.com', 'Browser': 'Mozilla/5.0', 'FraudScore': '7.00', 'CountryCode': 'US', 'OrgISP': 'Spectrum', 'LoginSuccess': True, 'Validated': True, 'Deleted': False, 'Genesis': {'date': '2024-07-11 10: 35: 25.000000', 'timezone_type': 3, 'timezone': 'America/New_York'
            }
        }
    ], 'total_logins': 3, 'request_id': 'T2SKxvCdvB'
}
<?php

// Replace this with your API Key
$api_key = "YOUR_API_KEY_HERE";

// Construct the API endpoint
$url = "https://www.ipqualityscore.com/api/json/loginhistory/" . $api_key . "/";

// Suppress errors with @ and attempt to get the content
$response = @file_get_contents($url);

if ($response === false) {
    echo "Request failed: Unable to fetch the URL.\n";
    exit;
}

// Decode the JSON response
$data = json_decode($response, true);

// Check for any JSON parsing errors
if (json_last_error() !== JSON_ERROR_NONE) {
    echo "Failed to parse JSON response.\n";
    exit;
}

// Print the results
echo "Response JSON:\n";
print_r($data);
import requests

# Replace this with your API Key
api_key = "YOUR_API_KEY_HERE"

# Construct the API endpoint
url = f"https://www.ipqualityscore.com/api/json/loginhistory/{api_key}/"

try:
    # Send a GET request with only the api_key in the URL
    response = requests.get(url, timeout=10)
    response.raise_for_status()  ## Raise an error if the response was not successful
    data = response.json()
    
    # Print the results
    print("Response JSON:")
    print(data)

except requests.exceptions.RequestException as e:
    print("Request failed:", e)

Ready to eliminate fraud?

Start fighting fraud now with 1,000 Free Lookups!

We're happy to answer any questions or concerns.

Chat with our fraud detection experts any day of the week.

Call us at: (800) 713-2618