{"id":49348,"library":"signal-rest-ts","title":"signal-rest-ts","description":"TypeScript wrapper around signal-cli-rest-api (v0.2.5) enabling programmatic control of Signal Messenger via REST. Provides typed classes for sending/receiving messages, managing accounts and groups. Current stable release is 0.2.5 with low release cadence. Supports both Node.js and browser (ESM, CJS, and DOM bundle). Alternative to signal-cli-rest-api's raw HTTP endpoints, adding TypeScript safety and streamlined API. Requires external signal-cli-rest-api instance running in JSON-RPC mode for receive functionality. Ships TypeScript types.","status":"active","version":"0.2.5","language":"javascript","source_language":"en","source_url":"https://github.com/pseudogeneric/signal-rest-ts","tags":["javascript","signal","messenger","signal-cli-rest-api","rest-api","typescript"],"install":[{"cmd":"npm install signal-rest-ts","lang":"bash","label":"npm"},{"cmd":"yarn add signal-rest-ts","lang":"bash","label":"yarn"},{"cmd":"pnpm add signal-rest-ts","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Required backend service; signal-rest-ts is a wrapper and cannot function without a running instance of signal-cli-rest-api.","package":"signal-cli-rest-api","optional":false}],"imports":[{"note":"Default export is not available; use named import.","wrong":"import SignalClient from 'signal-rest-ts'","symbol":"SignalClient","correct":"import { SignalClient } from 'signal-rest-ts'"},{"note":"You can also access account service via SignalClient.account().","symbol":"AccountService","correct":"import { AccountService } from 'signal-rest-ts'"},{"note":"Package is ESM-first; CommonJS require() may not work with default configuration.","wrong":"const { MessageService } = require('signal-rest-ts')","symbol":"MessageService","correct":"import { MessageService } from 'signal-rest-ts'"},{"note":"Group management operations.","symbol":"GroupService","correct":"import { GroupService } from 'signal-rest-ts'"},{"note":"For handling incoming messages; requires signal-cli-rest-api in json-rpc mode.","symbol":"ReceiveService","correct":"import { ReceiveService } from 'signal-rest-ts'"}],"quickstart":{"code":"import { SignalClient } from 'signal-rest-ts';\n\nconst signal = new SignalClient('http://localhost:8080');\n\nasync function main() {\n  const accounts = await signal.account().getAccounts();\n  if (accounts.length === 0) {\n    console.log('No accounts registered.');\n    return;\n  }\n  const msg = await signal.message().sendMessage({\n    number: accounts[0],\n    message: 'Hello from signal-rest-ts!',\n    recipients: ['+1234567890']\n  });\n  console.log('Message sent:', msg);\n}\n\nmain().catch(console.error);","lang":"typescript","description":"Demonstrates basic usage: initialize SignalClient, fetch accounts, send a text message to a recipient."},"warnings":[{"fix":"Start signal-cli-rest-api with the --json-rpc flag.","message":"Receive service requires signal-cli-rest-api to be started in JSON-RPC mode (--json-rpc flag), otherwise registerHandler and startReceiving will fail.","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Iterate over all accounts and call startReceiving for each one.","message":"Each account requires a separate WebSocket connection for receiving messages; forgetting to call startReceiving for each account will miss messages.","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Call signal.receive().stopAllReceiving() on process exit (e.g., SIGINT handler).","message":"WebSocket connections are not automatically closed on process exit; can cause resource leaks.","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Add appropriate CORS headers to the nginx/Apache config proxying to signal-cli-rest-api.","message":"CORS must be configured on the signal-cli-rest-api reverse proxy when using in browser; otherwise requests will be blocked.","severity":"gotcha","affected_versions":">=0.1.0"}],"env_vars":null,"search_vec":"'0.2.5':36 'account':29 'ad':62 'altern':51 'api':12,57,67,74,95,98 'around':7 'browser':45 'bundl':50 'cadenc':40 'cjs':47 'class':24 'cli':10,55,72,93 'control':16 'current':32 'dom':49 'enabl':14 'endpoint':61 'esm':46 'extern':69 'function':84 'group':31 'http':60 'instanc':75 'javascript':88 'json':79 'json-rpc':78 'low':38 'manag':28 'messag':27 'messeng':19,90 'mode':81 'node.js':43 'programmat':15 'provid':22 'raw':59 'receiv':83 'releas':34,39 'requir':68 'rest':3,11,21,56,73,94,97 'rest-api':96 'rpc':80 'run':76 'safeti':64 'sending/receiving':26 'ship':85 'signal':2,9,18,54,71,89,92 'signal-cli-rest-api':8,53,70,91 'signal-rest-t':1 'stabl':33 'streamlin':66 'support':41 'ts':4 'type':23,87 'typescript':5,63,86,99 'v0.2.5':13 'via':20 'wrapper':6","created_at":"2026-06-07T17:01:18.164156+00:00","updated_at":"2026-06-07T17:01:18.164156+00:00","problems":[{"fix":"Use import syntax: import { SignalClient } from 'signal-rest-ts'. Ensure package is installed: npm install signal-rest-ts","cause":"Using CommonJS require() instead of ESM import, or missing package installation.","error":"ERR_MODULE_NOT_FOUND: Cannot find module 'signal-rest-ts'"},{"fix":"Import ReceiveService: import { ReceiveService } from 'signal-rest-ts'. Then call signal.receive() after instantiating SignalClient.","cause":"Trying to use ReceiveService without importing it or calling a method incorrectly.","error":"TypeError: signal.receive is not a function"},{"fix":"Restart signal-cli-rest-api with the --json-rpc flag: e.g., signal-cli-rest-api --json-rpc","cause":"Receive functions require signal-cli-rest-api to be launched with --json-rpc flag.","error":"Error: signal-cli-rest-api must be started with json-rpc mode enabled"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/pseudogeneric/signal-rest-ts#readme","github":"https://github.com/pseudogeneric/signal-rest-ts","docs":null,"changelog":null,"pypi":null,"npm":"signal-rest-ts","openapi_spec":null,"status_page":null,"smithery":null,"categories":["messaging"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}