
Messaging
RocketNet.Chat
Unofficial .NET SDK for Rocket.Chat
netstandard2.0net8.0net10.0
Features
- Find a user by username, email or id
- Open the direct chat and post a message
- Read room history and unread counters
- Mark rooms read / unread
- Custom emoji and absolute media URLs
Installation
dotnet add package RocketNet.ChatQuick start
using RocketNet.Chat;
using var httpClient = new HttpClient();
var client = new RocketChatClient(httpClient, new RocketChatClientOptions
{
BaseAddress = new Uri("https://chat.example.com/"),
UserId = "rbAXPnMktTFbNpwtJ",
AuthToken = "RScctEHSmLGZ...",
});
// Look the user up, open the private chat and post into it — one call.
var posted = await client.SendDirectMessageAsync(
RocketChatUserQuery.ByEmail("kim@example.com"),
"Deploy finished ✅");
Console.WriteLine(posted.Message?.RoomId);Key methods
SendDirectMessageAsyncFind, open the chat and post — in one callFindUserAsyncFind a userCreateDirectMessageAsyncOpen the private chatPostMessageAsyncPost a messageGetHistoryAsyncRoom historyREADMEgithub.com/ai-iskuzhin/RocketNet.Chat
Loading README from the repository…