Client Packages

Official libraries to integrate Keyva into your applications.

Node.js

Official

The keyva-client package provides a type-safe interface for interacting with the Keyva API.

Installation

npm install keyva-client

Usage

import { KeyvaClient } from 'keyva-client';

const client = new KeyvaClient({
  apiKey: process.env.KEYVA_API_KEY,
  // optional base URL if using a self-hosted instance
  // baseUrl: 'https://keyva.dev' 
});

// Validate a license key
const result = await client.licenses.validate({
  key: 'LICENSE-KEY-HERE',
});

if (result.valid) {
  console.log('License is valid!', result.license);
} else {
  console.log('License is invalid:', result.code);
}