Telegram.Bot-Inspired API
Familiar and intuitive API design for developers who've used Telegram.Bot
Build powerful Signal bots with the simplicity of Telegram.Bot

const string baseUrl = "http://localhost:8080";
// Your registered Signal number
const string botNumber = "+1234567890";
var client = new SignalBotClient(builder =>
{
builder
.WithBaseUrl(baseUrl)
.WithNumber(botNumber);
});
using var cts = new CancellationTokenSource();
client.StartReceiving(async (botClient, message, ct) =>
{
Console.WriteLine($"Received from {message.Account}: {message.Envelope?.DataMessage?.Message}");
// Echo the message back
if (!string.IsNullOrEmpty(message.Envelope?.DataMessage?.Message))
{
await botClient.SendMessageAsync(
builder => builder
.WithRecipient(message.Envelope!.SourceNumber!)
.WithMessage($"You said: {message.Envelope?.DataMessage.Message}")
, cancellationToken: ct);
}
},
async (botClient, error, ct) =>
{
Console.WriteLine($"Error: {error.Source}:{error.Exception?.Message}");
await Task.CompletedTask;
}, builder => builder.WithMaxMessages(1), cts.Token);Signal.Bot was born from a simple question: "Why is there a polished Telegram.Bot library for .NET, but nothing similar for Signal?"
If you've ever wanted to build a Signal bot in .NET but were put off by the lack of proper tooling, this library is for you. It wraps the signal-cli-rest-api with a clean, intuitive interface that feels familiar to anyone who's used Telegram.Bot.
dotnet add package Signal.BotInstall-Package Signal.Bot<PackageReference Include="Signal.Bot" Version="1.0.0" />