Signal.js is a Node.js library that allows you to easily interact with the Signal Messenger.

It is:

  • object-oriented

  • event-driven

  • statically typed and compatible with TypeScript

  • it aims to cover 100% of Signal's features (in a future version)

Installation

Node.js 16.9.0 or newer is required.

If you want to install the latest stable version:

npm install --save @equestria.dev/signal.js

If you want to install the latest development version:

npm install --save @equestria.dev/signal.js@dev

Warning: Development versions are unstable and may change at any time without warning.

signal-cli will be installed automatically. However, if you use Windows or macOS, you will also need the Java Runtime Environment (JRE) version 17 or later, accessible with the command java. You can download an open-source version of Java here.

Then, you can register on Signal:

Example usage

After Signal.js is installed, we can create a simple example bot with this code:

const { Client } = require('@equestria.dev/signal.js');

const client = new Client({
    account: "your phone number here"
});

client.on('message', async (message) => {
    if (message.content === "!ping") {
        await message.reply("Pong!");
    }
});

Develop responsibly

Signal is run by a non-profit and moderating it is almost impossible due to the encrypted nature of the application. The Signal.js developers do not encourage using Signal.js for abusive purposes.

Please abide to the Signal Terms of Service while using this library, the developers claim absolutely no responsibility in the event your Signal account gets terminated due to abuse.

Was this helpful?