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

Add account number to challenge token log output

Open benjy3gg opened this issue 1 year ago • 3 comments

Feature Request

I have a multi-number signal setup. When i get a rate-limit-challenge the logging works and i get the token id and the phonenumber of the recipient.

To lift the rate-limit i need to call http://localhost:8888/v1/accounts/{number}/rate-limit-challenge with the number of the registered account in signal-cli. This number is not in the log output.

Can you please add it?

benjy3gg avatar Jul 23 '24 12:07 benjy3gg

Just to get it right: By log output you mean the JSON response, right?

bbernhard avatar Jul 23 '24 18:07 bbernhard

{"jsonrpc":"2.0","error":{"code":-5,"message":"Failed to send message due to rate limiting","data":{"response":{"timestamp":1721686852997,"results":[{"recipientAddress":{"uuid":"xxxx-xxxx","number":"+0123456789"},"type":"RATE_LIMIT_FAILURE","token":"xxxx-xxxx-xxxxxyy","retryAfterSeconds":86400}]}}},"id":"xxxxxx-xxyxyyyy"} Yes I meant this json response.

benjy3gg avatar Jul 23 '24 18:07 benjy3gg

With the next release the number should now be returned in normal and native mode. But in json-rpc mode the output comes directly from signal-cli. I guess I could manually extend the output with the information, but maybe it would be better to create an upstream feature request. Sounds cleaner to me :)

bbernhard avatar Jul 23 '24 20:07 bbernhard