API Key Authentication
All OathNet API endpoints require authentication via API key. Your API key should be included in every request using thex-api-key header.
Getting Your API Key
1
Sign In
Go to oathnet.org and sign in to your account.
2
Navigate to Account Settings
Go to your Dashboard > Account.
3
Copy Your API Key
Your API key is displayed in the account settings. Copy it and store it securely.
Get Your API Key
Go to your dashboard to view your API key
Using Your API Key
Include thex-api-key header (lowercase!) in every request:
Using the API Playground
The API documentation includes an interactive playground on each endpoint page. To use it:1
Navigate to an Endpoint
Go to any endpoint page (e.g., Breach Search)
2
Enter Your API Key
Look for the Authorization section in the playground panel on the right. Click to expand it and enter your API key.
3
Set Parameters
Fill in the required parameters for the endpoint
4
Send Request
Click Send to execute the request and see the live response
Your API key is stored in your browser’s local storage and is only sent directly to the OathNet API server.
Authentication Errors
401 Unauthorized
Returned when the API key is missing or invalid:- Missing
x-api-keyheader - Typo in the API key
- Using wrong header name (e.g.,
AuthorizationorX-API-Keyinstead ofx-api-key)
403 Forbidden
Returned when access is denied:- Endpoint requires a higher subscription tier
- Daily quota exceeded
- Account suspended
Security Best Practices
Use Environment Variables
Use Environment Variables
Never hardcode API keys in your source code. Use environment variables:
Keep Your Key Secret
Keep Your Key Secret
- Never share your API key publicly
- Don’t commit it to version control
- Don’t include it in client-side code
- If you believe your key has been compromised, contact support immediately
Monitor Your Usage
Monitor Your Usage
Regularly check your API usage in the dashboard to detect unusual activity or unexpected quota usage.