Attrove Workflows Connect Goals Docs Pricing
Quickstart API Reference TypeScript SDK MCP Server

Attrove SDK Installation — TypeScript SDK for Node.js

The official Attrove SDK provides type-safe access to all API endpoints. Install it with your preferred package manager and start building.

Installation

npm install @attrove/sdk
# or
yarn add @attrove/sdk
# or
pnpm add @attrove/sdk

Requires Node.js 18+ and TypeScript 5+. Types are included, no separate @types package needed.

Configuration

Partner (Admin) Client

Use the admin client for server-to-server operations like creating users and generating tokens. Requires your client_id and client_secret.

import { Attrove } from '@attrove/sdk';

const admin = Attrove.admin({
  clientId: 'your-client-id',
  clientSecret: process.env.ATTROVE_CLIENT_SECRET!,
});

User Client

Use the user client for per-user operations like search, query, and data retrieval. Requires the sk_ token returned when you create a user.

import { Attrove } from '@attrove/sdk';

const attrove = new Attrove({
  apiKey: process.env.ATTROVE_SECRET_KEY!,  // sk_ token from user creation
  userId,
});

Environment Variables

# .env
ATTROVE_CLIENT_ID=your-client-id
ATTROVE_CLIENT_SECRET=your-client-secret

# Per-user keys (stored in your database)
# ATTROVE_SECRET_KEY=sk_live_...  # from user creation response

Never expose your client_secret or sk_ tokens in client-side code. These should only be used in your backend server.

Next steps

  • Quickstart Guide — end-to-end walkthrough
  • API Reference — all endpoints & examples