Getting started overview

Integrating with Threat Jammer involves a sequence of steps designed to enable rapid access to its threat intelligence capabilities. The initial phase focuses on account creation and securing the necessary authentication credentials. Subsequently, developers proceed to make a foundational API request to confirm the setup and familiarity with the API structure. This process aims to provide a functional integration point from which further development can proceed.

The core objective of the Threat Jammer API is to provide real-time data on IP, domain, and ASN reputation, which can be leveraged for fraud prevention, security automation, and threat detection. The API supports various query types, allowing developers to retrieve specific threat indicators and risk scores. For a comprehensive overview of the API's capabilities, consult the Threat Jammer official documentation.

Quick Reference Guide

Step What to do Where
1. Sign Up Create a Threat Jammer account. Threat Jammer homepage
2. Get API Key Locate and copy your unique API key. Threat Jammer Dashboard > API Keys
3. Make Request Send a basic query to an API endpoint. Using cURL or an SDK (e.g., Python)
4. Verify Response Check for a successful JSON response. Your terminal or application logs

Create an account and get keys

To begin using Threat Jammer, you must first create an account. Threat Jammer offers a Developer Plan that provides 5,000 requests per month at no cost, which is suitable for initial testing and development.

  1. Navigate to the Signup Page: Visit the Threat Jammer website and locate the "Sign Up" or "Get Started" option.
  2. Complete Registration: Provide the required information, typically including email address and password. You may need to verify your email address.
  3. Access Dashboard: After successful registration and login, you will be directed to your Threat Jammer dashboard.
  4. Locate API Keys: Within the dashboard, find the section labeled "API Keys" or "Developer Settings." Your unique API key will be displayed here. This key is essential for authenticating all your API requests.
  5. Copy API Key: Copy your API key to a secure location. It is recommended to store API keys as environment variables rather than hardcoding them directly into your application code for security best practices, as outlined in general API security guidelines.

The API key acts as a bearer token or a query parameter, depending on the specific endpoint and client library used. Always treat your API key as sensitive information to prevent unauthorized access to your account and usage limits.

Your first request

Once you have your API key, you can make your first request to a Threat Jammer API endpoint. This example uses the IP Reputation API to query the reputation of a specific IP address. Threat Jammer provides examples in both Python and cURL, which are useful for initial testing.

Using cURL

cURL is a command-line tool and library for transferring data with URLs, commonly used for testing API endpoints. Replace YOUR_API_KEY with your actual Threat Jammer API key and 8.8.8.8 with the IP address you wish to query.

curl -X GET \
  "https://api.threatjammer.com/v1/ip/reputation?ip=8.8.8.8&key=YOUR_API_KEY" \
  -H "Accept: application/json"

This command sends an HTTP GET request to the IP Reputation API endpoint, including the IP address and your API key as query parameters. The -H "Accept: application/json" header requests the response in JSON format.

Using Python

Threat Jammer provides a Python SDK, which simplifies interaction with the API. Ensure you have Python installed and then install the SDK:

pip install threatjammer-python

After installation, you can make a request using the following Python code:

import os
from threatjammer import ThreatJammerClient

# It's recommended to store your API key as an environment variable
api_key = os.getenv("THREATJAMMER_API_KEY")

if not api_key:
    print("Error: THREATJAMMER_API_KEY environment variable not set.")
    exit()

client = ThreatJammerClient(api_key=api_key)

# Query IP reputation
try:
    ip_address = "8.8.8.8"
    response = client.ip.get_reputation(ip=ip_address)
    print(f"IP Reputation for {ip_address}:\n{response.json()}")
except Exception as e:
    print(f"An error occurred: {e}")

Before running the Python script, set your API key as an environment variable. For example, on Linux/macOS:

export THREATJAMMER_API_KEY="YOUR_API_KEY"

On Windows (Command Prompt):

set THREATJAMMER_API_KEY="YOUR_API_KEY"

Or (PowerShell):

$env:THREATJAMMER_API_KEY="YOUR_API_KEY"

Expected Response

A successful request will return a JSON object containing reputation data for the queried IP address. The structure of the response will vary based on the specific API endpoint and the data available for the queried entity. For an IP address like 8.8.8.8 (Google's public DNS), you might see a response indicating low risk or benign status.

Example (simplified):

{
  "ip": "8.8.8.8",
  "reputation_score": 0.1,
  "is_vpn": false,
  "is_proxy": false,
  "threat_types": [],
  "country_code": "US",
  "asn": "AS15169"
}

For detailed response structures for each endpoint, refer to the Threat Jammer API reference.

Common next steps

After successfully making your first API call, consider these common next steps to further integrate Threat Jammer into your applications:

  • Explore Other Endpoints: Threat Jammer offers various APIs, including Domain Reputation, ASN Reputation, and more. Review the API documentation to understand the full range of available endpoints and their specific parameters and responses.
  • Implement Error Handling: Develop robust error handling mechanisms in your application to manage API rate limits, invalid requests, and other potential issues. The API typically returns standard HTTP status codes and JSON error messages.
  • Integrate with Your Application Logic: Incorporate the threat intelligence data into your application's decision-making processes. For example, use IP reputation scores to block suspicious login attempts or filter out malicious traffic.
  • Monitor Usage: Keep track of your API request usage through the Threat Jammer dashboard to ensure you stay within your plan's limits. Consider upgrading your Threat Jammer pricing plan if your usage increases.
  • Utilize SDKs: For languages like Python and Go, leverage the official SDKs to streamline API interactions, handle authentication, and parse responses more efficiently.
  • Set Up Webhooks (if available): If Threat Jammer offers webhook capabilities, configure them to receive real-time notifications for specific threat events or data updates, enabling proactive security responses.

Troubleshooting the first call

Encountering issues during your initial API call is common. Here are some troubleshooting steps:

  • Check API Key: Ensure your API key is correct and has not expired. Verify that it is included in the request as specified in the Threat Jammer API documentation (e.g., as a query parameter or a bearer token).
  • Verify Endpoint URL: Confirm that the API endpoint URL is accurate and matches the version specified in the documentation (e.g., https://api.threatjammer.com/v1/...).
  • Review Request Headers: Ensure that necessary HTTP headers, such as Accept: application/json, are correctly set.
  • Inspect Error Messages: If the API returns an error, carefully read the HTTP status code and the JSON error message in the response body. Common HTTP status codes include:
    • 400 Bad Request: Often indicates missing or malformed parameters.
    • 401 Unauthorized: Typically means the API key is missing or invalid.
    • 403 Forbidden: Your API key might lack permissions for the requested resource, or your account might be rate-limited.
    • 404 Not Found: The requested endpoint does not exist.
    • 429 Too Many Requests: You have exceeded your API rate limits.
  • Check Rate Limits: Review your Threat Jammer dashboard to confirm you haven't exceeded your plan's request limits.
  • Consult Documentation: The Threat Jammer official documentation contains detailed information on error codes, request formats, and common issues.
  • Network Connectivity: Ensure your development environment has stable internet connectivity and no firewalls are blocking outbound requests to api.threatjammer.com.