Skip to main content
All API requests to FAPIHub require authentication. You must include your personal API key in every request using the ApiKey header.

How to Authenticate

Include the ApiKey header with your API key in all requests. Keys look like bg_live_sk_….
Example using cURL:

Obtaining Your API Key

  1. Go to fapihub.com and sign up / log in to your account.
  2. Navigate to the Dashboard.
  3. Create an API key in the dashboard and copy it.
Keep your API key secure. Never share it publicly or commit it to version control (e.g., GitHub). If you suspect your key has been compromised, regenerate it immediately from the dashboard.

Authentication Rules

  • The ApiKey header is required for all endpoints, including /v2/account/usage/.
  • API keys are tied to your account and plan limits.
  • A missing, wrong, or deactivated API key returns 401 Unauthorized. These rejections don’t count against your quota.
  • A valid key on an account whose subscription has expired returns 403 with the code subscription_expired. See Errors for all 403 cases.
Error examples:
request_id is included whenever the request was logged. Include it when you contact support@fapihub.com.

Best Practices

  • Store your API key securely using environment variables or a secret manager.
  • Rotate your API key periodically for better security.
  • Use different keys for development, staging, and production environments if possible.