Signal REST API client
Signal REST API client
Vendor: https://github.com/bbernhard/signal-cli-rest-api
Env
cat << EOF > .env
HOST='http://signal-api.local.net:8080'
SIGNALNUM='+990001234567'
EOF
About
source .env
curl -s '$HOST/v1/about' | jq
#
{
"versions": [
"v1",
"v2"
],
"build": 2,
"mode": "json-rpc",
"version": "0.92",
"capabilities": {
"v2/send": [
"quotes",
"mentions"
]
}
}
Contacts
source .env
curl -s "$HOST/v1/contacts/$SIGNALNUM"
Groups
source .env
curl -s "$HOST/v1/receive/$SIGNALNUM"
Show connected groups
source .env
curl -s "$HOST/v1/groups/$SIGNALNUM" | jq
Check UNTRUSTED identities
source .env
curl -s "$HOST/v1/identities/$SIGNALNUM" | jq '.[] | select(.status == "UNTRUSTED")'
Send message to Group
source .env
curl -s -X POST -H "Content-Type: application/json" \
-d '{"message":"Hello, world","number":"+990001234567","recipients": ["group.<ID>"]}' \
"$HOST/v2/send"