Backend SDKs

Stream ships seven backend SDKs. Each one covers every Stream product: one client object gives you chat, video, feeds and moderation from the same process, authenticated with your API key and secret. The code tabs across this Platform section assume you have constructed that client.

Backend SDKs run on your server and hold your API secret. Anything that runs on a user's device belongs in a client SDK instead.

The SDKs

LanguagePackageRegistry
Node.js@stream-io/node-sdknpm
PythongetstreamPyPI
Gogithub.com/GetStream/getstream-go/v4Go modules
Javaio.getstream:stream-sdk-javaMaven Central
Rubygetstream-rubyRubyGems
PHPgetstream/getstream-phpPackagist
.NETgetstream-netNuGet

Full source code for every SDK is on the GetStream GitHub organization. If Stream has no SDK for your language, use the REST API directly.

Installation

npm install @stream-io/node-sdk
# or
yarn add @stream-io/node-sdk

Creating a client

Construct the client with your API key and secret. Both are in your Stream Dashboard. The secret grants full access to the API, so it must never leave your server.

import { StreamClient } from "@stream-io/node-sdk";
// or: const { StreamClient } = require("@stream-io/node-sdk");

const client = new StreamClient("your_api_key", "your_api_secret");

Construct one client when your process starts and reuse it everywhere. The client is safe to share and maintains one HTTP connection pool for all products. See Connection pooling for the pool and timeout settings you can pass at construction.

One client, every product

App-level operations live directly on the client: users, tokens, app settings and async tasks. Product-specific operations hang off a product namespace, such as client.chat in Python or client.Chat() in Go.

The first server-side task in most integrations is minting a token that lets a user connect from your app. Authentication and tokens covers that end to end.

Shared behavior

The SDKs behave the same way across languages, and this section documents that behavior once:

  • Error handling: the typed exception hierarchy every SDK raises.
  • Logging: structured log events with identical field names in every language.
  • Async operations: waiting on long-running tasks.
  • Rate limits: reading limit headers and handling 429 responses.