signal-cli-rest-api icon indicating copy to clipboard operation
signal-cli-rest-api copied to clipboard

/v2/send - missing parameter `trustNewIdentities` in JSON-RPC mode

Open iljalife opened this issue 1 year ago • 1 comments

The problem

Changed trust_mode via endpoint [POST] /v1/configuration/{number}/settings (set "trust_mode": "always").

Command: curl -X POST -H "Content-Type: application/json" 'http://localhost:8080/v2/send' -d '{"message": "Test message", "number": "SENDER", "recipients": [ "RECIPIENT" ]}'

Response: {"error":"Failed to send message due to untrusted identities"}

The /v2/send container log:

time="2023-12-28T11:13:18Z" level=debug msg="full command: {\"jsonrpc\":\"2.0\",\"method\":\"send\",\"id\":\"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\",\"params\":{\"recipient\":[\"RECIPIENT\"],\"message\":\"Test message\",\"account\":\"SENDER\"}}"
[GIN] 2023/12/28 - 11:13:18 | 400 |  205.775004ms |      172.17.0.1 | POST     "/v2/send"

Are you using the latest released version?

  • [X] Yes

Have you read the troubleshooting page?

  • [X] Yes

What type of installation are you running?

signal-cli-rest-api Docker Container

In which mode are you using the docker container?

JSON-RPC Mode

What's the architecture of your host system?

x86-64

Additional information

No response

iljalife avatar Dec 28 '23 11:12 iljalife

For someone who found the issue like I years later, this is not related to Signal Client, this is an issue of the protocol/servers that idk why blocked an account. The solution is to call if you used Signal-cli

signal-cli -a $SENDER trust --trust-all-known-keys $RECIPIENT

VladZheleznyak avatar Mar 02 '24 22:03 VladZheleznyak