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
- Log in to dash.whisper.security
- Navigate to API Keys
- Give it a descriptive name (e.g., "Production App", "Development")
- Click Generate Key
- 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.
