Signal.Bot 0.1.0

Prefix Reserved
This package has a SemVer 2.0.0 package version: 0.1.0+80.
dotnet add package Signal.Bot --version 0.1.0
                    
NuGet\Install-Package Signal.Bot -Version 0.1.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Signal.Bot" Version="0.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Signal.Bot" Version="0.1.0" />
                    
Directory.Packages.props
<PackageReference Include="Signal.Bot" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Signal.Bot --version 0.1.0
                    
#r "nuget: Signal.Bot, 0.1.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Signal.Bot@0.1.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Signal.Bot&version=0.1.0
                    
Install as a Cake Addin
#tool nuget:?package=Signal.Bot&version=0.1.0
                    
Install as a Cake Tool

Signal.Bot

<div align="center">

<img alt="Signal.Bot logo" height="128" src="https://raw.githubusercontent.com/st0o0/Signal.Bot/eb7e4e5c69480e29a635b5f93b764aff899b3eba/docs/logo/logo.png" width="128"/>

A .NET Signal Messenger Bot Client - because sometimes Telegram isn't enough

NuGet License Downloads Deploy Documentation </div>


What is Signal.Bot?

Signal.Bot wraps the signal-cli-rest-api with a clean, intuitive interface inspired by Telegram.Bot. If you've ever wanted to build a Signal bot in .NET but were put off by the lack of proper tooling - this is for you.

Key highlights:

  • Telegram.Bot-inspired API — feels immediately familiar
  • Built-in polling via StartReceiving
  • Full feature support: messages, attachments, groups, profiles
  • Modern async/await with proper CancellationToken handling

Prerequisites

Signal.Bot requires signal-cli-rest-api as a backend. The quickest way to get it running is via Docker:

mkdir -p $HOME/.local/share/signal-api

docker run -d --name signal-api --restart=always -p 8080:8080 \
  -v $HOME/.local/share/signal-api:/home/.local/share/signal-cli \
  -e 'MODE=native' \
  bbernhard/signal-cli-rest-api

Option 1 – Link as Secondary Device (Recommended)

Open http://localhost:8080/v1/qrcodelink?device_name=signal-bot in your browser, then scan the QR code via Signal → Settings → Linked Devices.

Option 2 – Register a New Number

curl -X POST "http://localhost:8080/v1/register/+1234567890"
curl -X POST "http://localhost:8080/v1/register/+1234567890/verify/123456"

Installation

# Package Manager
Install-Package Signal.Bot

# .NET CLI
dotnet add package Signal.Bot

<PackageReference Include="Signal.Bot" Version="1.0.0"/>

Quick Start

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

var client = new SignalBotClient(builder => builder
    .WithBaseUrl("http://localhost:8080")
    .WithNumber("+1234567890"));

using var cts = new CancellationTokenSource();

client.StartReceiving(
    async (botClient, message, ct) =>
    {
        var text = message.Envelope?.DataMessage?.Message;
        Console.WriteLine($"Received from {message.Account}: {text}");

        if (!string.IsNullOrEmpty(text))
        {
            await botClient.SendMessageAsync(builder => builder
                .WithRecipient(message.Envelope!.SourceNumber!)
                .WithMessage($"You said: {text}"),
                cancellationToken: ct);
        }
    },
    async (botClient, error, ct) =>
    {
        Console.WriteLine($"Error: {error.ErrorType}: {error.Exception?.Message}");
        await Task.CompletedTask;
    },
    builder => builder.WithMaxMessages(1),
    cts.Token);

Console.WriteLine("Bot is running. Press any key to stop...");
Console.ReadKey();
cts.Cancel();

Features

Category Details
Messages Send & receive text, mentions, reactions
Attachments Images, videos, documents, voice messages
Groups Create, list, update, delete
Profiles Name, about, avatar
Polling Built-in StartReceiving mechanism
Type Safety Strongly-typed models throughout
Async Full async/await & CancellationToken support

Architecture

Your Application
      │
      ▼
Signal.Bot          ← This library
(SignalBotClient)
      │
      ▼
signal-cli-rest-api ← Docker container
(HTTP REST API)
      │
      ▼
Signal Servers

Configuration

Performance Modes

Set via the MODE environment variable:

Mode Speed Memory Recommended
native Fast Low ✅ Yes
json-rpc Fastest High Only if needed
normal Slow Low Fallback

Troubleshooting

Bot not receiving messages? Make sure you're registered and the container is running: docker ps. Test the API with curl http://localhost:8080/v1/about.

"Connection refused" errors? Check your port mapping and that the URL you configured matches the running container.

Messages not sending? Verify the recipient is a valid Signal number and check container logs: docker logs signal-api.


Contributing

  1. Fork the repo and create a feature branch: git checkout -b feature/my-feature
  2. Write tests and make sure they pass: dotnet test
  3. Open a Pull Request

Please keep changes focused, follow the existing code style, and update docs for any API changes.


License

MIT — see LICENSE for details.


Built with ❤️ for the .NET and Signal communities · Open an issue

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0 28 3/1/2026

🎯 Signal.Bot v0.1.0

📦 NuGet: https://nuget.org/packages/Signal.Bot
🔗 Release: https://github.com/st0o0/Signal.Bot/releases/v0.1.0

See release page for full changelog and details!

Built with ❤️