curl -fsSL https://getstream.io/cli.sh | bash
getstream skillsInstallation
This SDK is the server half of your integration. Your users read and write feeds from your app with a client SDK, and anything that needs a connected user or a live WebSocket belongs there: the state layer, device push registration, and client-side error handling. See the client-side overview for what lives there. Token signing stays on this side, because it needs your API secret.
Stream CLI and Agent Skills
Manage Stream from your terminal with the Stream CLI, including scripting and AI-agent workflows. Install the CLI and the default Agent Skills:
Then ask your agent in plain English, for example:
/stream List feed groups in my app.See the CLI docs and Agent Skills docs for more.
NuGet Package Manager
NuGet\Install-Package getstream-net -Version 11.0.0Use the latest available SDK release when starting a new integration.
Check getstream-net releases and replace the version if a newer one is available.
.NET CLI
dotnet add package getstream-net --version 11.0.0PackageReference
Add the following to your .csproj file:
<PackageReference Include="getstream-net" Version="11.0.0" />GitHub repository: https://github.com/GetStream/getstream-net. Feel free to submit bug reports and feature requests.
The package is tested against these environments:
- .NET 6.0+ (including .NET 7.0, .NET 8.0+, and .NET 9.0+)
To create a client, you'll need your API key and secret. Both of them can be found in your Stream Dashboard.
You can optionally configure request timeouts and the HTTP connection pool. The default request timeout is 30 seconds.
using GetStream;
using GetStream.Models;
class Program
{
static async Task Main(string[] args)
{
string apiKey = "";
string secret = "";
// Create client using ClientBuilder
var builder = new ClientBuilder()
.ApiKey(apiKey)
.ApiSecret(secret);
// Build the main client
var client = builder.Build();
// Build the feeds client
var feedsClient = builder.BuildFeedsClient();
// Your feeds operations here...
}
}Alternative initialization
You can also initialize the client using configuration:
using GetStream;
using Microsoft.Extensions.Configuration;
// Using configuration
var configuration = new ConfigurationBuilder()
.AddJsonFile("appsettings.json")
.Build();
var builder = new ClientBuilder()
.ApiKey(configuration["Stream:ApiKey"])
.ApiSecret(configuration["Stream:Secret"]);
var client = builder.Build();
var feedsClient = builder.BuildFeedsClient();Connection pool and timeouts
The shared defaults and tuning options are documented on Connection pooling; this section covers the .NET specifics.
The SDK reuses a single HttpClient backed by a SocketsHttpHandler with keep-alive enabled. Tune it on the ClientBuilder:
| Method | Default | Description |
|---|---|---|
RequestTimeout | 30s | Per-request timeout. |
MaxConnsPerHost | 5 | Maximum concurrent connections per host. |
IdleTimeout | 55s | Idle connection lifetime. |
ConnectTimeout | 10s | TCP + TLS handshake timeout. |
var builder = new ClientBuilder()
.ApiKey(apiKey)
.ApiSecret(secret)
.MaxConnsPerHost(10)
.IdleTimeout(TimeSpan.FromSeconds(55))
.ConnectTimeout(TimeSpan.FromSeconds(10))
.RequestTimeout(TimeSpan.FromSeconds(30));
var feedsClient = builder.BuildFeedsClient();To take full control of the HTTP stack, pass your own HttpClient with .HttpClient(...). When set, the pool options above are not applied.