Authentication

Learn how to authenticate with the Freigent platform

Freigent uses API keys for authentication. All API requests must include a valid API key in the Authorization header.

Getting Your API Key

  1. Log into Your Account

  2. Navigate to API Settings

    • Go to SettingsAPI Keys
    • Click Generate New Key
  3. Configure Key Permissions

    • Select the appropriate permissions for your use case
    • Choose an expiration date (optional)
    • Add a description for easy identification

Using API Keys

Header Authentication

Include your API key in the Authorization header of all requests:

curl -H "Authorization: Bearer your_api_key_here" \
  https://api.freigent.ai/v1/loads

JavaScript/Node.js Example

const apiKey = 'your_api_key_here';

const response = await fetch('https://api.freigent.ai/v1/loads', {
  headers: {
    'Authorization': `Bearer ${apiKey}`,
    'Content-Type': 'application/json'
  }
});

const data = await response.json();

Python Example

import requests

api_key = 'your_api_key_here'
headers = {
    'Authorization': f'Bearer {api_key}',
    'Content-Type': 'application/json'
}

response = requests.get(
    'https://api.freigent.ai/v1/loads',
    headers=headers
)

data = response.json()

Security Best Practices

Environment Variables

Never hardcode API keys in your source code. Use environment variables:

# .env
FREIGENT_API_KEY=your_api_key_here
const apiKey = process.env.FREIGENT_API_KEY;

HTTPS Only

Always use HTTPS when making API requests. HTTP requests will be rejected.

Testing Your Authentication

Use this endpoint to verify your API key is working:

curl -H "Authorization: Bearer YOUR_API_KEY" \
  https://api.freigent.ai/v1/auth/verify

Success response:

{
  "authenticated": true,
  "user_id": "user_123",
  "permissions": ["read", "write"]
}

AI Assistant

Ask about Freigent docs

Welcome to AI Assistant

Ask me anything about Freigent documentation, Chrome Extension setup, API integration, or platform features.

Press Enter to send, Shift+Enter for new line