LiveKit.AspNetCore.ServerSdk.Abstractions
1.2.0
See the version list below for details.
dotnet add package LiveKit.AspNetCore.ServerSdk.Abstractions --version 1.2.0
NuGet\Install-Package LiveKit.AspNetCore.ServerSdk.Abstractions -Version 1.2.0
<PackageReference Include="LiveKit.AspNetCore.ServerSdk.Abstractions" Version="1.2.0" />
<PackageVersion Include="LiveKit.AspNetCore.ServerSdk.Abstractions" Version="1.2.0" />
<PackageReference Include="LiveKit.AspNetCore.ServerSdk.Abstractions" />
paket add LiveKit.AspNetCore.ServerSdk.Abstractions --version 1.2.0
#r "nuget: LiveKit.AspNetCore.ServerSdk.Abstractions, 1.2.0"
#:package LiveKit.AspNetCore.ServerSdk.Abstractions@1.2.0
#addin nuget:?package=LiveKit.AspNetCore.ServerSdk.Abstractions&version=1.2.0
#tool nuget:?package=LiveKit.AspNetCore.ServerSdk.Abstractions&version=1.2.0
LiveKit ASP.NET Core Server SDK
ASP.NET Core SDK for LiveKit Server API. Provides HTTP clients and services for managing rooms, participants, recordings, ingress, SIP, and more.
Features
- ✅ Room Management - Create, list, and delete rooms
- ✅ Participant Management - Manage participants, tracks, and subscriptions
- ✅ Egress - Record and stream rooms, participants, or tracks
- ✅ Ingress - Bring external media (RTMP, WHIP, URL pull) into LiveKit
- ✅ SIP Integration - Manage SIP trunks, dispatch rules, and make calls
- ✅ Token Generation - JWT token builder with fluent API
- ✅ Webhook Validation - Two-layer security (JWT + SHA256)
- ✅ Agent Dispatch - Deploy AI agents to rooms
- ✅ Phone Numbers - Search, purchase, and manage phone numbers
Installation
Install the packages from NuGet:
dotnet add package LiveKit.AspNetCore.ServerSdk
dotnet add package LiveKit.AspNetCore.ServerSdk.Abstractions
Or via Package Manager:
Install-Package LiveKit.AspNetCore.ServerSdk
Install-Package LiveKit.AspNetCore.ServerSdk.Abstractions
Quick Start
1. Configure Services
In your Program.cs or Startup.cs:
builder.Services.AddLiveKit(options =>
{
options.BaseUrl = "wss://your-livekit-server.com";
options.ApiKey = "your-api-key";
options.ApiSecret = "your-api-secret";
});
2. Generate Access Tokens
public class TokenController : ControllerBase
{
private readonly ILiveKitTokenService _tokenService;
public TokenController(ILiveKitTokenService tokenService)
{
_tokenService = tokenService;
}
[HttpGet]
public IActionResult GetToken(string identity, string roomName)
{
var token = _tokenService
.CreateTokenBuilder(identity)
.WithKind(ParticipantInfo.Types.Kind.Standard)
.WithVideoGrant(video =>
{
video.RoomJoin = true;
video.Room = roomName;
video.CanPublish = true;
video.CanSubscribe = true;
})
.ToJwt();
return Ok(new { token });
}
}
3. Manage Rooms
public class RoomsController : ControllerBase
{
private readonly ILiveKitRoomService _roomService;
public RoomsController(ILiveKitRoomService roomService)
{
_roomService = roomService;
}
[HttpPost]
public async Task<IActionResult> CreateRoom(string name)
{
var request = new CreateRoomRequest { Name = name };
var room = await _roomService.CreateRoomAsync(request);
return Ok(room);
}
[HttpGet]
public async Task<IActionResult> ListRooms()
{
var request = new ListRoomsRequest();
var response = await _roomService.ListRoomsAsync(request);
return Ok(response);
}
[HttpDelete("{roomName}")]
public async Task<IActionResult> DeleteRoom(string roomName)
{
var request = new DeleteRoomRequest { Room = roomName };
var response = await _roomService.DeleteRoomAsync(request);
return NoContent();
}
}
4. Handle Webhooks
Create a controller for receiving webhook events:
public class WebhookController : ControllerBase
{
private readonly ILiveKitWebhookReceiver _webhookReceiver;
public WebhookController(ILiveKitWebhookReceiver webhookReceiver)
{
_webhookReceiver = webhookReceiver;
}
[HttpPost("/webhook")]
public async Task<IActionResult> ReceiveWebhook()
{
var body = await new StreamReader(Request.Body).ReadToEndAsync();
var authHeader = Request.Headers["Authorization"].ToString();
var webhookEvent = _webhookReceiver.Receive(body, authHeader);
// Handle webhook event
switch (webhookEvent.Event)
{
case LiveKitWebhookEvents.ROOM_STARTED:
// Handle room started
break;
case LiveKitWebhookEvents.PARTICIPANT_JOINED:
// Handle participant joined
break;
case LiveKitWebhookEvents.PARTICIPANT_LEFT:
// Handle participant left
break;
case LiveKitWebhookEvents.TRACK_PUBLISHED:
// Handle track published
break;
// Add more cases as needed
}
return Ok();
}
}
Available Services
Room Service
ILiveKitRoomService - Manage rooms and participants
Egress Service
ILiveKitEgressService - Record and stream content
Ingress Service
ILiveKitIngressService - Create ingress endpoints for external media
SIP Service
ILiveKitSipService - Manage SIP trunks and dispatch rules
Token Service
ILiveKitTokenService - Generate JWT tokens for client authentication
Webhook Receiver
ILiveKitWebhookReceiver - Validate and parse webhook events
Additional Services
ILiveKitAgentDispatchService- Deploy agents to roomsILiveKitPhoneNumberService- Manage phone numbersILiveKitCloudAgentService- Manage LiveKit Cloud agents
Documentation
- LiveKit Documentation
- Authentication Guide
- Server APIs
- RoomService APIs
- Egress APIs
- Ingress APIs
- SIP APIs
- Webhooks
License
MIT License - see LICENSE file for details
Contributing
Contributions are welcome! Please open an issue or submit a pull request on GitHub.
This README was generated by claude-sonnet-4-20250514
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Google.Protobuf (>= 3.33.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on LiveKit.AspNetCore.ServerSdk.Abstractions:
| Package | Downloads |
|---|---|
|
LiveKit.AspNetCore.ServerSdk
ASP.NET Core SDK for LiveKit Server API. Provides HTTP clients and services for managing rooms, participants, recordings, ingress, SIP, and more. Includes JWT token generation, webhook validation, and support for all LiveKit server APIs. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 3.2.0 | 129 | 9/27/2026 |
| 3.1.0 | 225 | 7/20/2026 |
| 3.0.0 | 192 | 7/5/2026 |
| 2.2.2 | 420 | 5/27/2026 |
| 2.2.1 | 161 | 5/27/2026 |
| 2.2.0 | 181 | 5/22/2026 |
| 2.1.8 | 172 | 5/7/2026 |
| 2.1.7 | 174 | 5/7/2026 |
| 2.1.6 | 162 | 5/7/2026 |
| 2.1.5 | 235 | 4/25/2026 |
| 2.1.4 | 189 | 4/21/2026 |
| 2.1.3 | 301 | 4/18/2026 |
| 2.1.2 | 161 | 4/18/2026 |
| 2.1.1 | 293 | 3/23/2026 |
| 2.1.0 | 216 | 3/12/2026 |
| 2.0.0 | 185 | 3/4/2026 |
| 1.2.2 | 174 | 3/3/2026 |
| 1.2.0 | 160 | 3/3/2026 |
| 1.1.3 | 166 | 3/3/2026 |