Docs/Authentication

Authentication

Learn how to authenticate your API requests using API keys.

API Keys

The Acme API uses API keys to authenticate requests. You can view and manage your API keys in your dashboard.

Keep your keys secure
Your API keys carry many privileges, so be sure to keep them secure. Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, etc.

Making Authenticated Requests

Include your API key in the Authorization header:

bash
curl https://api.acme.com/v1/users \
  -H "Authorization: Bearer YOUR_API_KEY"

Using the SDK

If you're using our SDK, authentication is handled automatically:

app.js
javascript
import { Acme } from '@acme/sdk';

// The SDK automatically includes your API key
const acme = new Acme({
  apiKey: process.env.ACME_API_KEY,
});

// All requests are now authenticated
const user = await acme.users.retrieve('user_123');

API Key Types

TypePrefixUse Case
Liveaq_live_Production requests
Testaq_test_Development & testing
Test Mode
Test API keys allow you to make API calls without affecting live data. Use test keys during development and switch to live keys for production.

Error Responses

If authentication fails, you'll receive one of these errors:

json
{
  "error": {
    "code": "invalid_api_key",
    "message": "The API key provided is invalid.",
    "status": 401
  }
}
AlgoQuill

AlgoQuill Support

AI-powered help

Hi! I'm the AlgoQuill assistant. Ask me anything about our documentation platform — features, pricing, how to get started, or technical questions. How can I help you today?