Skip to main content

Authentication

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

API Keys

API keys are unique identifiers that authenticate your requests to the Infinite API. Each key is tied to your organization and determines what resources you can access.

Key Format

API keys follow this format:
  • Live keys: sk_live_... - For production use
  • Sandbox keys: sk_sandbox_... - For development and testing
Never expose your API keys in client-side code, version control, or logs. Always keep them secure on your backend servers.

Making Authenticated Requests

Include your API key in the Authorization header using the Bearer scheme:

Error Responses

Authentication failures return specific error codes:

Invalid API Key

Missing Authorization Header

Insufficient Permissions

Best Practices

Store API keys securely using environment variables or secret management systems. Never hardcode them in your application.
Regularly rotate your API keys for security. Generate new keys in the dashboard and update your applications before revoking old keys.
Use different API keys for sandbox and production environments. This ensures proper isolation and prevents accidental production changes.

Webhook Authentication

Webhooks are authenticated using HMAC signatures. See our Webhooks Guide for details on verifying webhook authenticity.