# @braustin-holdings/homebase-node-sdk

> A node SDK for interacting with braustin-holdings/homebase.

Latest version **0.0.2345** (published 2026-02-24) · ISC license · 0 weekly downloads

## Install

```sh
npm install @braustin-holdings/homebase-node-sdk
pnpm add @braustin-holdings/homebase-node-sdk
yarn add @braustin-holdings/homebase-node-sdk
bun add @braustin-holdings/homebase-node-sdk
```

## Health

**Score 45/100 (D)** — status: stable.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.0.2345 |
| Published | 2026-02-24 |
| First published | 2022-02-14 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 20.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | 8ctopotamus |
| Maintainers | 8ctopotamus, cwollak, itadmins_braustin |

## Links

- npm: https://www.npmjs.com/package/@braustin-holdings/homebase-node-sdk
- Repository: https://github.com/braustin-holdings/homebase-node-sdk
- Issues: https://github.com/braustin-holdings/homebase-node-sdk/issues
- npm.io page: https://npm.io/package/@braustin-holdings/homebase-node-sdk

## Dependencies (1)

- [axios](https://npm.io/package/axios.md) ^1.2.1

## Recent versions

- 0.0.2345 (latest) — 2026-02-24
- 0.0.2343 — 2024-10-29
- 0.0.2342 — 2024-03-14
- 0.0.2341 — 2023-11-08
- 0.0.2340 — 2022-12-28
- 0.0.234 — 2022-09-15
- 0.0.2339 — 2022-09-07
- 0.0.232 — 2022-08-31
- 0.0.231 — 2022-08-30
- 0.0.230 — 2022-08-22
- 0.0.229 — 2022-08-22
- 0.0.228 — 2022-08-08
- 0.0.227 — 2022-07-19
- 0.0.226 — 2022-07-19
- 0.0.225 — 2022-06-27
- … 6 more at https://npm.io/package/@braustin-holdings/homebase-node-sdk/versions

## README

# homebase-node-sdk
A node SDK for interacting with braustin-holdings/homebase. Provides an authenticated for the [Homebase React Client](https://github.com/braustin-holdings/homebase-react).

## Installation
`npm i @braustin-holdings/homebase-node-sdk`

## Usage 
Instantiate a new HomeBaseSDK object by passing it your app's `clientId` and `clientSecret`.

```js
const HomeBaseSDK = require('@braustin-holdings/homebase-node-sdk')
const hb = new HomeBaseSDK('CLIENT_ID_HERE', 'CLIENT_SECRET_HERE')
```

## Authentication with Homebase
There are two ways of obtaining a JSONwebtoken to gain access to the Homebase data. Choose whichever is most convenient for your app.

### **The getAuthToken method**
For use in your controllers or scripts.

```js
const tokenData = await hb.getAuthToken()
console.log(tokenData) // { token: '39fp...', graphqlUrl: 'https://homebase-api.herokuapp.com' }
```

### **As an Express middleware**
If you're using express and the HomeBase React Client, you can easily obtain the token by including this middlware. NOTE you will want this to be one of the earlier middleware in the chain.

The [Homebase React Client](https://github.com/braustin-holdings/homebase-react) looks for the url used in the middelware.

```js
const app = express()

app.use(hb.middleware.getAuthToken) // res.json({ token: '39fp...', graphqlUrl: 'https://homebase-api.herokuapp.com' })
```

---
_Source: https://npm.io/package/@braustin-holdings/homebase-node-sdk · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
