docs.title/Authentication

Authentication

API Reference

API Key Authentication

Barq uses API keys for authentication. Include your key in every request via the Authorization header.

Bearer Token Format

Authorization: Bearer YOUR_BARQ_API_KEY

Getting Your API Key

  1. Sign up at barqapi.com/signup
  2. Verify your email address
  3. Go to Dashboard → API Keys
  4. Click Create API Key
  5. Copy and store your key securely — it won't be shown again

Security Best Practices

  • Never expose your API key in client-side code, public repos, or screenshots
  • Use environment variables to store keys (BARQ_API_KEY)
  • Rotate keys periodically — create new keys and revoke old ones
  • Set IP whitelists for production environments
  • Monitor key usage in your dashboard for anomalies

Example: Environment Variable

# .env
BARQ_API_KEY=barq-sk-abc123xyz...

Key Revocation

You can revoke any API key from your dashboard. Revoked keys stop working immediately. Create a new key to continue using the API.

docs.readyToStart

docs.readyToStartDesc

Invite a friend, both get free tokens!

💡 Login to get your personal referral link

Read our referral program policy