A .NET 10 library for the Twitch Helix API and EventSub WebSocket, designed for Native AOT from the ground up.
NOTE: Pleae be advised that this is an alpha release. Release 0.2.0 will have the full documentation.
- Full Helix API coverage -- 30 endpoint categories with typed request/response models
- EventSub WebSocket client -- real-time events with automatic reconnection and keepalive monitoring
- Native AOT compatible -- trimming-safe with source-generated JSON serialization (zero reflection)
- Built-in resilience -- automatic retries with exponential backoff, rate limiting, and token management
- Dependency injection ready -- first-class integration with
Microsoft.Extensions.Hosting - Modern C# 14 -- sealed records, file-scoped namespaces, collection expressions, and
fieldkeyword
| Package | Description |
|---|---|
TwitchSharp |
Core primitives, exceptions, and pagination helpers |
TwitchSharp.Api |
Helix API client with authentication and rate limiting |
TwitchSharp.EventSub |
EventSub WebSocket client for real-time events |
TwitchSharp.Hosting |
Dependency injection and hosted service integration |
TwitchSharp.Extensions.Authentication |
Interactive OAuth PKCE flow for desktop/CLI apps |
await using var client = TwitchApiClient.Create(new TwitchApiClientOptions
{
ClientId = "your_client_id",
ClientSecret = "your_client_secret"
});
var users = await client.Users.GetUsersAsync(logins: ["twitchdev"]);var builder = Host.CreateApplicationBuilder(args);
builder.AddTwitchApi();
builder.AddTwitchEventSub();
var app = builder.Build();
app.Run();Configure via appsettings.json:
{
"Twitch": {
"ClientId": "your_client_id",
"ClientSecret": "your_client_secret"
}
}See CONTRIBUTING.md for development setup and coding guidelines.