bbernhard / signal-cli-rest-api

Dockerized Signal Messenger REST API
https://bbernhard.github.io/signal-cli-rest-api/
MIT License
1.24k stars 151 forks source link

Sending fails, requesting a Captcha #536

Open HorizonKane opened 3 months ago

HorizonKane commented 3 months ago

The problem

I installed the REST API addon succesful. I also managed to register with Captcha and got the activation key and activated.

I also added the necessary potion in the configuration.yaml.

When I create an automation to send a message, it fails with:

"Failed to send (some) messages: +49xxxxxxxxxx: CAPTCHA proof required for sending to "+49xxxxxxxxxx", available options "RECAPTCHA" with challenge token "91xx51ce-71dx1-4xx2-8xxb-f858xx54be3f", or wait "86400" seconds. To get the captcha token, go to https://signalcaptchas.org/challenge/generate.html After solving the captcha, right-click on the "Open Signal" link and copy the link. Use the following command to submit the captcha token: signal-cli submitRateLimitChallenge --challenge CHALLENGE_TOKEN --captcha CAPTCHA_TOKEN 17xx6899xxx2 WARN ManagerImpl - No profile name set. When sending a message it's recommended to set a profile name with the updateProfile command. This may become mandatory in the future. Failed to send message due to rate limiting"

Tried normal, native and json-rpc mode.

Are you using the latest released version?

Have you read the troubleshooting page?

What type of installation are you running?

Home Assistant Signal Addon

In which mode are you using the docker container?

Normal Mode

What's the architecture of your host system?

x86-64

Additional information

No response

bbernhard commented 3 months ago

Please update your profile and set a username. This can be done with: https://bbernhard.github.io/signal-cli-rest-api/#/Profiles/put_v1_profiles__number_ (this should remove the warning about the unset username).

regarding the actual error: you are running into rate limiting issues (I guess you've sent too many messages in a short time). To lift the rate limiting restrictions use the challenge token that was returned in the error message together with this endpoint https://bbernhard.github.io/signal-cli-rest-api/#/Accounts/post_v1_accounts__number__rate_limit_challenge

HorizonKane commented 3 months ago

Hi,

Will set the username.

And no, I did not send many message. In fact I just started the automation manually two or three times to send a single message which never worked :( Will try this anyways and post back later.

fnordson commented 2 weeks ago

Please update your profile and set a username. This can be done with: https://bbernhard.github.io/signal-cli-rest-api/#/Profiles/put_v1_profiles__number_ (this should remove the warning about the unset username).

regarding the actual error: you are running into rate limiting issues (I guess you've sent too many messages in a short time). To lift the rate limiting restrictions use the challenge token that was returned in the error message together with this endpoint https://bbernhard.github.io/signal-cli-rest-api/#/Accounts/post_v1_accounts__number__rate_limit_challenge

I'm sorry, but I guess I don't understand it. I have the same issue as OP, got the challenge token from the HA log, went to https://signalcaptchas.org/challenge/generate, got the captcha from that and put all this into console like this:

curl -X POST -H "Content-Type: application/json" -d '{"captcha":"signal-hcaptchaXXXXXX", "challenge_token": "tokennumberXXXX"}' 'http://XXX.XXX.XXX.XXX:8080/v1/accounts/+4XXXXX/rate-limit-challange'

I got back this:

404 page not found

What am I missing? I was using the same IP for the URL as I did within the registration process. So what page is the problem here?

HorizonKane commented 2 weeks ago

Hi fnordson,

Try to type challenge instead of challange ;)

Also for us it did not work instantly but after a few tries. But there should be no 404 (whi h is probably because of the typo)

fnordson commented 1 week ago

This is embarrassing...thank you very much.

It worked instantly here. I guess, usually the issue is the longevity of the captcha. It's VERY short.

HorizonKane commented 1 week ago

Glad it works now :)