Skip to content

Repository files navigation

Kick.Client

Modern .NET packages for the Kick platform API, OAuth 2.1 PKCE flows, and RSA-verified webhooks.

Packages

  • Kick.Client
  • Kick.Client.AspNetCore
  • Kick.Client.DependencyInjection
  • Kick.Client.Generated

What this repo provides

  • a typed Kiota-based API client for the Kick platform API
  • OAuth 2.1 PKCE helpers for desktop and local-app flows
  • webhook signature verification and normalized event models
  • ASP.NET Core route mapping helpers
  • an interactive Spectre.Console sample that walks through tunnel setup, auth, and event subscriptions

Install

dotnet add package Kick.Client
dotnet add package Kick.Client.AspNetCore

Add the DI package when you want service registration helpers:

dotnet add package Kick.Client.DependencyInjection

Quick start

usingKick.Client.Authentication;KickOAuthOptionsoptions=new(){ClientId="your-client-id",RedirectUri="http://127.0.0.1:5200/oauth/callback",Scopes="user:read channel:read events:subscribe"};stringcodeVerifier=KickPkceFlowHelper.GenerateCodeVerifier();stringcodeChallenge=KickPkceFlowHelper.DeriveCodeChallenge(codeVerifier);stringstate=Guid.NewGuid().ToString("N");stringauthorizationUrl=KickPkceFlowHelper.BuildAuthorizationUrl("https://id.kick.com",options,codeChallenge,state);

ASP.NET Core webhook example

usingKick.Client.AspNetCore;usingKick.Client.Webhooks;varbuilder=WebApplication.CreateBuilder(args);builder.Services.AddKickClient();varapp=builder.Build();app.MapKickWebhook("/webhooks/kick",static(_,_)=>Task.FromResult(newKickWebhookOptions()),static(evt,_,_)=>{Console.WriteLine(evt.EventType);returnTask.CompletedTask;});awaitapp.RunAsync();

Sample

Run the interactive sample to host a webhook endpoint, expose it through Azure Dev Tunnels, complete PKCE auth, and subscribe to Kick webhook events:

dotnet run --project samples/Kick.Client.Sample

Development

dotnet test Kick.Client.slnx

About

Typed .NET client for the Kick API, OAuth 2.1 PKCE, and RSA-verified webhooks.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages