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:

  1. A client ID and secret (for OAuth2 flow), or
  2. A long-lived API token for server-to-server communication

For Platform Users

If you have access to the DarkSight Intel platform:

  1. Log into https://platform.omegablack.io
  2. Navigate to SettingsAPI Access
  3. Generate a new API token
  4. 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 Authorization header
  • 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 TypeExpiration
API Token1 year (configurable)
Session Token24 hours
OAuth Token1 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

IssueSolution
"Invalid token" errorVerify the token is copied correctly without extra spaces
"Token expired"Generate a new token from the platform
"Forbidden" errorContact your account manager to verify permissions
Connection timeoutCheck network/firewall settings for the API domain