Whisper API Authentication

This guide covers how to authenticate your requests to the Whisper API. All API endpoints are secured and require a valid API key to access.

All Whisper API endpoints use Bearer Token authentication for all requests. This means you must include your secret API key in an Authorization header with every API call you make.

Getting Your API Key

  1. Log in to dash.whisper.security
  2. Navigate to API Keys
  3. Give it a descriptive name (e.g., "Production App", "Development")
  4. Click Generate Key
  5. Copy the key

Using Your API Key

Include your API key in the Authorization header using the Bearer scheme:

Authorization: Bearer YOUR_API_KEY

Replace {YOUR_API_KEY} with the secret token you received from Whisper Security.

Examples

curl

Here is a basic example of an authenticated request using cURL, which is the foundation for all our SDKs.

curl -X GET "https://api.whisper.security/intelligence/v1/ip/8.8.8.8" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json"

Python SDK

import whisper_api_sdk

configuration = whisper_api_sdk.Configuration(
    host="https://api.whisper.security",
    access_token="whisper_abc123..."
)

TypeScript / Node.js SDK

import { Configuration } from 'whisper-api-sdk';

const config = new Configuration({
  accessToken: 'whisper_abc123...'
});

C# / .NET SDK

var client = new HttpClient();
client.DefaultRequestHeaders.Authorization = 
    new AuthenticationHeaderValue("Bearer", "whisper_abc123...");

Java SDK

ApiClient client = new ApiClient();
client.setBearerToken("whisper_abc123...");

Security Best Practices

Protecting your API key is crucial for securing your account.

  • Never hardcode your API key in source code. Use environment variables or a secure secret management system.
  • Never expose your key in client-side code like frontend JavaScript.
  • Use HTTPS for all API requests to ensure your key is transmitted securely.
  • Rotate your API keys regularly as a security precaution.