SDK Installation
The official TypeScript SDK provides typed access to the OpenSlaq API, real-time events via Socket.IO, and helper utilities for building bots and integrations.
Install
npm install openslaqbun add openslaqpnpm add openslaqBasic usage
import { OpenSlaq } from "openslaq";
const client = new OpenSlaq({ token: process.env.OPENSLAQ_BOT_TOKEN!,});
// Send a messageawait client.chat.postMessage({ channelId: "ch_abc123", content: "Hello from the SDK!",});Requirements
- Node.js 18+ or Bun 1.0+
- TypeScript 5.0+ (recommended, but not required)
Next steps
- Authentication — learn about token types and scopes
- API Reference — full list of available methods