Authentication
Authentication
All DarkSight Intel API endpoints require authentication using Bearer tokens.
Authentication Method
The API uses JWT (JSON Web Token) Bearer authentication. Include your token in the Authorization header of every request.
Header Format
Authorization: Bearer YOUR_TOKEN
Example Request
curl -X GET "https://platform.omegablack.io/api/v1/reports" \
-H "Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6..." \
-H "Content-Type: application/json"
Obtaining Your Token
For Partners
Contact your account manager to obtain API credentials. They will provide you with:
- A client ID and secret (for OAuth2 flow), or
- A long-lived API token for server-to-server communication
For Platform Users
If you have access to the DarkSight Intel platform:
- Log into https://platform.omegablack.io
- Navigate to Settings → API Access
- Generate a new API token
- Copy and securely store the token
Token Security
Important security practices:
- Never expose tokens in client-side code or public repositories
- Store tokens in environment variables or secure vaults
- Rotate tokens periodically
- Use the minimum required permissions
Error Responses
401 Unauthorized
{
"error": "Unauthorized",
"message": "Invalid or missing authentication token"
}
Causes:
- Missing
Authorizationheader - Invalid or expired token
- Malformed token format
403 Forbidden
{
"error": "Forbidden",
"message": "Insufficient permissions for this resource"
}
Causes:
- Token doesn't have access to the requested resource
- Organization-level restrictions
Token Expiration
Tokens expire based on their type:
| Token Type | Expiration |
|---|---|
| API Token | 1 year (configurable) |
| Session Token | 24 hours |
| OAuth Token | 1 hour (refresh available) |
When a token expires, you'll receive a 401 Unauthorized response. Generate a new token or use the refresh flow if available.
Testing Authentication
Verify your token is working:
curl -X GET "https://platform.omegablack.io/api/v1/reports?limit=1" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json"
A successful response indicates your authentication is configured correctly.
Troubleshooting
| Issue | Solution |
|---|---|
| "Invalid token" error | Verify the token is copied correctly without extra spaces |
| "Token expired" | Generate a new token from the platform |
| "Forbidden" error | Contact your account manager to verify permissions |
| Connection timeout | Check network/firewall settings for the API domain |
Updated 4 days ago
