Easy Labs
SDKsJavaScript

Installation

Install @easylabs/browser and verify your setup.

Prerequisites

  • A modern evergreen browser (the SDK uses fetch, URL, and postMessage; no polyfills bundled).
  • A bundler that understands ES modules — Vite, Rollup, esbuild, webpack 5, or Parcel all work. The package is published as ESM with a CJS fallback.
  • Node 22+ if you build the project locally (the package's engines field declares >=22).
  • An Easy Labs API key. Sandbox keys are prefixed sk_test_; production keys are not. Get one from the Easy Labs dashboard.

Install the package

npm install @easylabs/browser
pnpm add @easylabs/browser
yarn add @easylabs/browser
bun add @easylabs/browser

Verify the install

import { createEasyClient } from "@easylabs/browser";

const easy = await createEasyClient({ apiKey: "sk_test_..." });

// If the key is invalid, createEasyClient rejects before you reach this line.
const customers = await easy.getCustomers({ limit: 1 });
console.log(customers);

createEasyClient calls GET /validate-key against the Easy Labs API as part of construction, so a successful resolution is itself proof that the key, the network path, and the SDK are all wired up correctly.

Next steps

On this page