Unofficial C# client library for the Streamlabs socket API. Allows you to receive events from Streamlabs in real-time.
This library is not ready for general use yet. Alpha releases are available on NuGet, but the API should not be considered stable until version 1.0.0.
dotnet add package Streamlabs.SocketClient
If you use Dependency Injection, you can use the Streamlabs.SocketClient.Extensions package for easier setup.
dotnet add package Streamlabs.SocketClient.Extensions
// provide the token directly
builder.Services.AddStreamlabsClient(options => options.Token = "store your token somewhere safe");
// or use a configuration section
builder.Services.AddStreamlabsClient(configuration.GetSection("Streamlabs"));
// automatically start and stop the client with the application
builder.Services.AddHostedService<StreamlabsStartStopWorker>();
Step-by-step instructions will be added here once the API is stable. For now you can use the Event Capture project as a reference.
Pull requests are welcome. Please use Conventional Commits to keep commit messages consistent.
When reporting bugs, please include the raw JSON payload of the event that caused the issue. You can find it attached to
the error message or by enabling debug logging and looking for Streamlabs: Event received - [json]
.
Alternatively, you can use the Event Capture
tool to capture events and save them to a file.
- Streamlabs API Documentation
- SocketIOClient by @doghappy is a great library for working with SocketIO servers in C#.
- Streamlabs-Events-Receiver by @ocgineer is a similar project that served as inspiration for this one.
Distributed under the MIT License. See LICENSE
for more information.