Skip to content

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

Terminal window
npm install openslaq

Basic usage

import { OpenSlaq } from "openslaq";
const client = new OpenSlaq({
token: process.env.OPENSLAQ_BOT_TOKEN!,
});
// Send a message
await 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