Skip to main content

Overview

The Vepler API uses API key authentication for all requests. You must include your API key in the x-api-key header of every request.
Keep your API keys secure! Never expose them in client-side code or public repositories.

Obtaining API Keys

1

Create Account

Sign up at app.vepler.com
2

Navigate to API Keys

Go to Settings → API Keys in your dashboard
3

Generate New Key

Click “Create New Key” and give it a descriptive name
4

Copy & Secure

Copy your key immediately - it won’t be shown again

Making Authenticated Requests

Include your API key in the x-api-key header:
import { SDK } from '@vepler/sdk';

const vepler = new SDK({
  apiKey: process.env.VEPLER_API_KEY
});

// Make a request
const response = await vepler.property.getV1PropertyLocationIds({
  locationIds: 'p_0x000123456789'
});

API Key Format

API keys use the prefix vpr_live_ followed by a unique identifier:
vpr_live_sk_1234567890abcdef

Security Best Practices

Never hardcode API keys. Use environment variables:
// Don't do this
const apiKey = 'vpr_live_sk_1234567890';

// Do this instead
const apiKey = process.env.VEPLER_API_KEY;
.env
VEPLER_API_KEY=vpr_live_sk_1234567890
Rotate your API keys regularly:
  1. Generate a new key in the dashboard
  2. Update your application with the new key
  3. Verify the new key works
  4. Delete the old key from the dashboard
Always make API calls from your server, never from client-side code. Your API key should never be exposed in browser JavaScript, mobile apps, or public repositories.

Error Handling

Handle authentication errors gracefully:
try {
  const response = await vepler.property.getV1PropertyLocationIds({
    locationIds: 'p_0x000123456789'
  });

  if (response.errorResponse) {
    console.error('API Error:', response.errorResponse.error);
  }
} catch (error) {
  if (error.statusCode === 401) {
    console.error('Invalid or missing API key');
  } else if (error.statusCode === 403) {
    console.error('Insufficient permissions');
  }
}

Authentication Errors

Status CodeDescriptionSolution
401Invalid or missing API keyCheck your API key is correct and included in the x-api-key header
403Insufficient permissionsYour API key does not have access to this resource

Testing Authentication

Verify your setup with a health check endpoint:
import { SDK } from '@vepler/sdk';

const vepler = new SDK({
  apiKey: process.env.VEPLER_API_KEY
});

const health = await vepler.system.getV1PropertyHealth();
console.log(health);

Next Steps