npm install @stream-io/node-sdk
// or using yarn
yarn add @stream-io/node-sdk
Activity Feeds V3 is in closed alpha — do not use it in production (just yet).
Installation
GitHub repository: https://github.com/GetStream/stream-node. Feel free to submit bug reports and feature requests.
The package is tested against these environments:
- Node.js@18
- Node.js@20
- Node.js@22
- Bun@1
Node@16 is not supported.
The package can be used with both JavaScript and TypeScript.
To create a server-side client, you’ll need your API key and secret. Both of them can be found in your Stream Dashboard.
You can optionally pass a timeout for the API requests, the default timeout is 3000ms.
import { StreamClient } from "@stream-io/node-sdk";
// or
// const { StreamClient } = require("@stream-io/node-sdk");
const apiKey = "";
const secret = "";
client = new StreamClient(apiKey, secret);
// optionally add timeout to API requests
// the default timeout is 3000ms
client = new StreamClient(apiKey, secret, { timeout: 3000 });