![]() |
VOOZH | about |
dotnet add package KickLib --version 1.10.0
NuGet\Install-Package KickLib -Version 1.10.0
<PackageReference Include="KickLib" Version="1.10.0" />
<PackageVersion Include="KickLib" Version="1.10.0" />Directory.Packages.props
<PackageReference Include="KickLib" />Project file
paket add KickLib --version 1.10.0
#r "nuget: KickLib, 1.10.0"
#:package KickLib@1.10.0
#addin nuget:?package=KickLib&version=1.10.0Install as a Cake Addin
#tool nuget:?package=KickLib&version=1.10.0Install as a Cake Tool
<p align="center"> <img src="KickLibLogo.png" style="max-height: 300px;"> </p>
<p align="center"> <a href="https://www.microsoft.com/net"><img src="https://img.shields.io/badge/-.NET%2010-1D5F7E" style="max-height: 300px;"></a> <a href="https://www.microsoft.com/net"><img src="https://img.shields.io/badge/-.NET%209-blueviolet" style="max-height: 300px;"></a> <a href="https://www.microsoft.com/net"><img src="https://img.shields.io/badge/-.NET%208-de1237" style="max-height: 300px;"></a> <a href="https://www.microsoft.com/net"><img src="https://img.shields.io/badge/.NET%20Standard%202.1-2ba8e2" style="max-height: 300px;"></a>⎮ <a href="https://discord.gg/fPRXy57WrS"><img src="https://img.shields.io/badge/Discord-KickLib-green.svg" style="max-height: 300px;"></a> <a href="https://github.com/Bukk94/KickLib/blob/master/LICENSE"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" style="max-height: 300px;"></a> <a href="https://www.nuget.org/packages/KickLib"><img src="https://img.shields.io/nuget/dt/KickLib?label=NuGet&color=orange" style="max-height: 300px;"></a> </p>
<p align="center"> <a href='https://ko-fi.com/bukk94' target='_blank'> <img height='30' style='border:0;height:38px;' src='https://storage.ko-fi.com/cdn/kofi6.png?v=6' border='0' alt='Buy Me a Coffee at ko-fi.com' /> </a>
KickLib is a C# library that allows for interaction with both official and unofficial (undocumented) Kick API (https://kick.com) and WebSocket (pusher). KickLib eases implementation for various chatbots by providing simple to use methods.
<details> <summary>Click here to see Complete Features List</summary>
KickLib provides support for unofficial API calls via IKickUnofficialApi and IKickClient interfaces.
Documentation for unofficial API can be found .
First, install NuGet. Then, install KickLib from the package manager console:
PM> Install-Package KickLib
Or from the .NET CLI as:
dotnet add package KickLib
If you are using Dependency Injection, you can easily add KickLib via extension method
.AddKickLib(), that will register all related services with Scoped lifetime.
To see complex examples you can copy-out, check out :
Almost all calls requires authentication. Kick officially supports OAuth 2.1 flow. KickLib provides tools for generating OAuth URLs, exchanging code for tokens, and refreshing tokens.
NOTE: If no state is provided, it will automatically generate state for you as base64 encoded verifier code!
var callbackUrl = "https://localhost:5001/auth/kick/callback";
var clientId = "01AAAAA0EXAMPLE66YG2HD9R";
var clientSecret = "aaac0000EXAMPLE8ebe4dc223d0c45187";
var authGenerator = new KickOAuthGenerator();
var url = authGenerator.GetAuthorizationUri(
callbackUrl,
clientId,
new List<string>
{
KickScopes.UserRead,
KickScopes.ChannelWrite
}, out var verifier);
// TODO: Perform URL redirect for the user and pass OAuth process
// By using callback URL, you will receive code and state, which can be used for Token exchange.
var code = "NAAAAAAY5YZQ00STATE000ZZTFHM2I1NJLK";
var state = "ZXhhbXBsZSB2YWx1ZQ==";
var exchangeResults = await authGenerator.ExchangeCodeForTokenAsync(
code,
clientId,
clientSecret,
callbackUrl,
state);
if (exchangeResults.IsSuccess)
{
Console.WriteLine($"Access Token: {exchangeResults.Value.AccessToken}");
Console.WriteLine($"Refresh Token: {exchangeResults.Value.RefreshToken}");
// TODO: Store access and refresh token for further use
// Keep in mind: Access token is short lived, while refresh token is long lived (and should be stored)
}
var clientId = "01AAAAA0EXAMPLE66YG2HD9R";
var clientSecret = "aaac0000EXAMPLE8ebe4dc223d0c45187";
var refreshToken = "NAAAAAAY5YZQ00REFRESHTOKEN000ZZTFHM2I1NJLK";
var authGenerator = new KickOAuthGenerator();
var exchangeResults = await authGenerator.RefreshAccessTokenAsync(
refreshToken,
clientId,
clientSecret);
// After every successful refresh, you will receive new access and refresh tokens
if (exchangeResults.IsSuccess)
{
Console.WriteLine($"Access Token: {exchangeResults.Value.AccessToken}");
Console.WriteLine($"Refresh Token: {exchangeResults.Value.RefreshToken}");
}
var api = KickApi.Create();
var accessToken = "XXXXXXXXXX";
// Get specific category by ID
var category = await api.Categories.GetCategoryAsync(28, accessToken);
var settings = new ApiSettings
{
RefreshToken = "ZZZZZZZZZZZZZZZZ",
ClientId = "XXXXXX",
ClientSecret = "YYYYYYYYYYYYYY"
};
var api = KickApi.Create(settings);
var channelInfo = await api.Channels.GetChannelAsync("foo");
var broadcasterId = channelInfo.Value.BroadcasterUserId;
await api.Chat.SendMessageAsUserAsync(broadcasterId, "Hello World");
To subscribe to events (reading chat messages or channel follow events),
you must first have public webhook URL set up in your Kick settings,
have webhooks enabled in your developer account, and lastly, your access token must
contain webhook scope (KickScopes.EventsSubscribe).
var api = KickApi.Create(new ApiSettings
{
AccessToken = "XXXXXXXXXX"
});
// Subscript to events (webhooks) for chat messages and channel follow events
var result = await api.EventSubscriptions.SubscribeToEventsAsync(
new List<EventType>
{
EventType.ChatMessageSent,
EventType.ChannelFollowed
});
// Each event will be assigned own SubscriptionId
// Events will be delivered to your **public** webhook URL (set up in [Kick settings](https://kick.com/settings/developer)).
This will subscribe to selected events. Once those events are triggered, Kick will send
them to your webhook URL. You can then use KickWebhookParser to validate and parse the payload.
You should always validate the payload signature to ensure the webhook payload is really coming from Kick.
Kick will retry sending the webhook 3 times, until 200 response is made by your server. If your server is unreachable or non-OK response is returned, Kick automatically unsubscribe the event!
KickLib allows automatic access token refresh. When RefreshToken, ClientId, and ClientSecret are provided, KickLib will automatically try to refresh access token when needed.
var settings = new ApiSettings
{
RefreshToken = "XXXXXXXXXXXXXXXX",
ClientId = "YYYYYYYYYYYYYYYY",
ClientSecret = "ZZZZZZZZZZZZZZZZ"
};
settings.RefreshTokenChanged += (sender, args) =>
{
Console.WriteLine($"Refresh token changed! New value: {args.NewToken}");
};
settings.AccessTokenChanged += (sender, args) =>
{
Console.WriteLine($"Access token changed! New value: {args.NewToken}");
};
var api = KickApi.Create(settings);
// TODO: use `api` for calling endpoints
Keep in mind that refreshing access token also changes the refresh token! KickLib is automatically refreshing those and will notify you via
RefreshTokenChangedevent. But you need to make sure you are storing the new refresh token for further use.
This is using Kick's undocumented (unofficial) pusher! IDs and values may differ from official API.
IKickClient client = new KickClient();
var chatroomId = 123456; // This ID can be obtained by using IUnofficialKickApi or by manually extracting from web netwowk tab.
client.OnMessage += delegate(object sender, ChatMessageEventArgs e)
{
Console.WriteLine($"Received message: {e.Data.Content}");
};
await client.ListenToChatRoomAsync(chatroomId);
await client.ConnectAsync();
// TODO: Make sure this is in endless loop and program won't exit immediately
// otherwise you won't be able to receive messages.
If you don't have a server set up to receive webhooks but want to test the payloads sent by Kick, you can use a service like Webhook.site.
For a long time, Kick didn't have any official API. Most of the functionality in KickLib was researched and reversed-engineered from their website.
With new released API support, this library will be adjusted accordingly, removing all unofficial endpoints and methods. Those methods will be replaced with proper official API calls (once we have all of them).
KickLib is meant to be used for education purposes. Don't use it for heavy scraping or other harmful actions against Kick streaming platform. I don't take responsibility for any KickLib misuse and I strongly advice against such actions.
See .
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 net5.0 was computed. net5.0-windows net5.0-windows was computed. net6.0 net6.0 was computed. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 was computed. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 is compatible. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 is compatible. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
| .NET Core | netcoreapp3.0 netcoreapp3.0 was computed. netcoreapp3.1 netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.1 netstandard2.1 is compatible. |
| MonoAndroid | monoandroid monoandroid was computed. |
| MonoMac | monomac monomac was computed. |
| MonoTouch | monotouch monotouch was computed. |
| Tizen | tizen60 tizen60 was computed. |
| Xamarin.iOS | xamarinios xamarinios was computed. |
| Xamarin.Mac | xamarinmac xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos xamarinwatchos was computed. |
Showing the top 1 NuGet packages that depend on KickLib:
| Package | Downloads |
|---|---|
|
PolyhydraGames.API.Kick
Kick integration library for Polyhydra/ChannelCheevos. Channel and livestream lookup, chat listener, and Post Office integration. |
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.10.0 | 1,922 | 1/31/2026 |
| 1.9.0 | 355 | 12/27/2025 |
| 1.8.0 | 326 | 12/4/2025 |
| 1.7.2 | 1,202 | 11/1/2025 |
| 1.7.1 | 232 | 10/31/2025 |
| 1.7.0 | 310 | 10/24/2025 |
| 1.6.2 | 268 | 10/10/2025 |
| 1.6.1 | 634 | 8/25/2025 |
| 1.6.0 | 460 | 7/30/2025 |
| 1.5.1 | 535 | 7/25/2025 |
| 1.5.0 | 454 | 7/6/2025 |
| 1.4.3 | 310 | 6/29/2025 |
| 1.4.2 | 983 | 6/11/2025 |
| 1.4.1 | 298 | 5/25/2025 |
| 1.4.0 | 210 | 5/23/2025 |
| 1.3.0 | 422 | 4/24/2025 |
| 1.2.2 | 356 | 4/17/2025 |
| 1.2.1 | 368 | 4/9/2025 |
| 1.2.0 | 372 | 4/7/2025 |
| 1.1.1 | 362 | 4/1/2025 |
Extended API support, categories v2, channel reward redemptions