Skip to content

Signal.BotA .NET Signal Messenger Bot Client

Build powerful Signal bots with the simplicity of Telegram.Bot

Signal.Bot

Quick Example

csharp
using Signal.Bot;
using Signal.Bot.Types;

var client = new SignalBotClient("http://localhost:8080");
var botNumber = "+1234567890";

await client.StartReceiving(
    botNumber,
    handleMessage: async (botClient, message, ct) =>
    {
        Console.WriteLine($"Received: {message.DataMessage?.Message}");
        
        if (!string.IsNullOrEmpty(message.DataMessage?.Message))
        {
            await botClient.SendMessageAsync(
                number: botNumber,
                message: $"You said: {message.DataMessage.Message}",
                recipients: new[] { message.Source },
                cancellationToken: ct
            );
        }
    },
    handleError: async (botClient, exception, ct) =>
    {
        Console.WriteLine($"Error: {exception.Message}");
    },
    cancellationToken: CancellationToken.None
);

Why Signal.Bot?

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.

Installation

bash
dotnet add package Signal.Bot
bash
Install-Package Signal.Bot
xml
<PackageReference Include="Signal.Bot" Version="1.0.0" />