Set up the SDK by hand

Install the SDK, create a client, and retrieve the first board context and jobs.

Create a client, confirm that your publishable key resolves the intended board, and retrieve the first page of live jobs. This quickstart uses a plain Node.js module so you can verify the Cavuno connection before adding framework code.

Prerequisites

  • Node.js 20 or later.
  • A project with a package.json.
  • Your pk_… publishable board key from Settings → Developer → SDK in the Cavuno dashboard.

1. Install the SDK

npm
pnpm
Yarn
Bun
npm install @cavuno/board

2. Set the public configuration

Add these values to the environment file used by your project:

dotenv
PUBLIC_CAVUNO_BOARD=pk_your_32_character_hex_key

Replace the placeholder with the key shown in Settings → Developer → SDK. A valid publishable key begins with pk_ followed by 32 hexadecimal characters.

These values are public configuration. Board-user access and refresh tokens are credentials and must not use these variables.

3. Create a connection check

Create check-cavuno.mjs:

js
import { createBoardClient } from '@cavuno/board';
const { PUBLIC_CAVUNO_BOARD } = process.env;
if (!PUBLIC_CAVUNO_BOARD) {
throw new Error('Set PUBLIC_CAVUNO_BOARD');
}
const board = createBoardClient({
board: PUBLIC_CAVUNO_BOARD,
});
const [context, jobs] = await Promise.all([
board.context(),
board.jobs.list({ limit: 3 }),
]);
console.log(`Connected to: ${context.name}`);
console.log(`Jobs returned: ${jobs.data.length}`);
for (const job of jobs.data) {
console.log(`- ${job.title}`);
}

The client uses https://api.cavuno.com and builds requests below /v1/boards/{board} automatically. Only pass baseUrl when Cavuno gives you a different API origin for staging or local development; never append /v1 or a board path.

4. Run the check

Load the environment using your project’s normal mechanism, then run:

bash
node check-cavuno.mjs

The first line should contain the exact board name shown in Cavuno. The job count can be zero for an empty board; that is a successful response, not a connection failure.

text
Connected to: Example Careers
Jobs returned: 3
- Senior Product Designer
- Staff Engineer
- Customer Success Lead

Your output reflects your own board data.

5. Move the client into your application

Create the client once and reuse it. In a TypeScript application, a typical module looks like this:

ts
import { createBoardClient } from '@cavuno/board';
export const board = createBoardClient({
board: process.env.PUBLIC_CAVUNO_BOARD!,
});

Adapt only the environment access to your framework. The framework guides show the correct server and browser boundaries.

Troubleshoot the first request

An API override is invalid

Production requires no API setting. If Cavuno gave you a staging or development override, pass only its origin as baseUrl—never include the board route or /v1.

The board does not resolve

Confirm that you copied the entire pk_… key. A slug or internal boards_… ID is accepted by the client, but deployed frontends should use the immutable publishable key.

The script returns no jobs

Check the board name first. If it is correct, an empty data array means the board has no jobs visible through the public API. It is not an SDK error.

A request throws

Do not replace the exception with an empty page. Continue to Handle SDK errors and branch on the typed error guards.

Next, read SDK fundamentals before adding authentication, pagination, or caching.