Skip to main content

API Key Authentication

The Bit2Connect Public API uses API keys for authentication. You can generate and manage your API keys from your project dashboard.

Getting Your API Key

  1. Log in to your Bit2Connect Dashboard
  2. Navigate to your project settings
  3. Go to the API Keys section
  4. Click Generate New API Key
  5. Copy and securely store your API key

Using Your API Key

Include your API key in the X-API-KEY header for all requests to the Public API:
curl -X GET "https://api.bit2connect.com/1.0/links" \
  -H "X-API-KEY: b2co_your_api_key_here"
Keep your API keys secure and never expose them in client-side code or public repositories.

Authentication Method

The public API uses the X-API-KEY header for authentication:

API Key Header

X-API-KEY: b2co_your_api_key_here
The public API only accepts the X-API-KEY header. Bearer tokens are reserved for dashboard authentication and should not be used with the public API.

API Key Format

All Bit2Connect API keys start with the prefix b2co_ followed by a unique identifier:
b2co_1234567890abcdef1234567890abcdef

Error Responses

Invalid API Key

{
  "success": false,
  "error": {
    "code": "INVALID_API_KEY",
    "message": "Invalid or missing API key"
  }
}

Rate Limit Exceeded

{
  "success": false,
  "error": {
    "code": "RATE_LIMIT_EXCEEDED",
    "message": "Rate limit exceeded. Please try again later."
  }
}

Insufficient Permissions

{
  "success": false,
  "error": {
    "code": "INSUFFICIENT_PERMISSIONS",
    "message": "Your API key does not have permission to perform this action"
  }
}