Skip to main content

Authentication Methods

Bloom uses Bearer token authentication with your organization API key.

Headers

Include your organization API key in the Authorization header:

Request Body

All proxy requests must include your agent ID:

Authentication Flow

1

API Key Validation

Bloom validates your organization API key from the Authorization header
2

Agent Verification

Verifies the agent_id exists and belongs to your organization
3

Scope Authorization

Checks if the agent has permission to access the requested service and endpoint
4

Proxy Request

Routes the authenticated request to the target service using stored credentials

API Key Types

Organization API Key

  • Used in the Authorization header
  • Identifies your organization
  • Required for all API calls
  • Found in Profile → API Keys

Agent ID

  • Included in request body
  • Identifies the specific agent
  • Determines scope permissions
  • Found in Agents → Agent Details

Example Implementation

MCP Authentication

For MCP servers using bloom-mcp-wrapper, authentication is handled automatically via the BLOOM_AUTH environment variable:
The wrapper extracts the credentials and handles proxy authentication transparently.

Security Considerations

Never expose API keys in client-side code or public repositories.

Best Practices

  • Environment Variables: Store credentials in environment variables
  • Key Rotation: Regularly rotate your organization API keys
  • Scope Limitation: Create agents with minimal required scopes
  • Monitor Usage: Review API usage logs regularly
  • Secure Storage: Use secure secret management in production

Development Security

Error Responses

Authentication errors return structured error responses:

401 Unauthorized

403 Forbidden

Testing Authentication

Verify your setup with this simple test: