Authentication

Learn how to authenticate and secure your API requests

API Key Authentication

All API requests to the Enterprise Proxy Network must be authenticated using API keys. API keys provide secure access to your account resources.

Generating API Keys

  1. 1
    Navigate to API Keys

    Go to Dashboard → API Keys → Create New Key

  2. 2
    Configure Key Settings

    Set a name, expiration date, and permissions for the key

  3. 3
    Save Your Key

    Copy the generated key immediately - it won't be shown again

Using API Keys in Requests

Include your API key in the Authorization header:

Authorization: Bearer sk_live_1234567890abcdef

Replace sk_live_1234567890abcdef with your actual API key

Authentication Methods

API Key

For server-to-server communication

  • • No expiration (unless set)
  • • Full API access
  • • Best for automated systems

JWT Token

For user sessions

  • • Short-lived (1-24 hours)
  • • User-specific permissions
  • • Best for web applications

Security Best Practices

  • • Never commit API keys to version control
  • • Use environment variables for key storage
  • • Rotate keys every 90 days
  • • Create separate keys for different environments
  • • Monitor key usage for suspicious activity

Token Management

Token Refresh Flow

JWT tokens expire for security. Use the refresh token endpoint to obtain new access tokens.

// Request new token using refresh token POST /api/v1/auth/refresh Content-Type: application/json { "refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." }
// Response with new tokens { "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", "refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", "expires_in": 3600, "token_type": "Bearer" }

Token Lifetime

Access Token
1 hour
Refresh Token
30 days
API Key
No expiration (configurable)

Error Handling

401
Unauthorized

Invalid or missing authentication token

403
Forbidden

Valid token but insufficient permissions

429
Too Many Requests

Rate limit exceeded for this API key

Was this helpful?

Help us improve our documentation