Skip to main content

Authentication

All API requests require a valid API key. The TrackVision API uses Bearer token authentication.

Getting an API Key

  1. Log in to the TrackVision platform at your account URL (e.g., acme.trackvision.ai)
  2. Go to Settings in the left navigation
  3. Click API Keys
  4. Click Create API Key
  5. Give the key a name (e.g., "My Integration") and click Create
  6. Copy the key — it will only be shown once

API keys have the format:

tv_key_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Making Authenticated Requests

Include your API key in the Authorization header of every request:

Authorization: Bearer tv_key_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Example

curl https://api.acme.trackvision.ai/v1/products \
-H "Authorization: Bearer tv_key_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

Security Best Practices

Never commit API keys to source control. Anyone with access to your repository will be able to read them.

Instead, use environment variables:

# .env (add to .gitignore)
TRACKVISION_API_KEY=tv_key_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
// In your code
const apiKey = process.env.TRACKVISION_API_KEY;

Rotate keys regularly. If a key is ever exposed, rotate it immediately in Settings → API Keys.

Use separate keys per environment. Create one key for development and a separate key for production so you can rotate them independently.

Error Responses

If your API key is missing or invalid, the API returns:

{
"error": {
"code": "unauthorized",
"message": "Invalid or missing API key"
}
}

HTTP status: 401 Unauthorized