Getting Started

Authentication

Set up authentication for your Inpera API calls

API Keys

API keys are the primary method of authenticating with the Inpera API. Each API key is associated with a specific project and has its own permissions.

To create an API key:

  1. Log in to your Inpera dashboard
  2. Go to Settings → API Keys
  3. Click "Create New API Key"
  4. Give it a name and select permissions
  5. Copy the key immediately (it won't be shown again)

Using API Keys

Include your API key in the Authorization header:

const response = await fetch('https://api.inpera.app/v1/snapshots', {
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  }
});

Environment Variables

For security, store your API key in environment variables:

# .env
INPERA_API_KEY=your-api-key-here
INPERA_PROJECT_ID=your-project-id

Then use it in your code:

const inpera = new Inpera({
  apiKey: process.env.INPERA_API_KEY,
  projectId: process.env.INPERA_PROJECT_ID
});

Security Best Practices

Follow these security best practices:

  • Never commit API keys to version control
  • Use environment variables for all sensitive data
  • Rotate API keys regularly
  • Use different keys for different environments
  • Revoke keys that are no longer needed