Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to register: StatusCode: 429 (RegistrationRetryException) #441

Open
2 tasks done
Cangoo opened this issue Nov 5, 2023 · 14 comments
Open
2 tasks done

Failed to register: StatusCode: 429 (RegistrationRetryException) #441

Cangoo opened this issue Nov 5, 2023 · 14 comments

Comments

@Cangoo
Copy link

Cangoo commented Nov 5, 2023

The problem

Get {"error":"Failed to register: StatusCode: 429 (RegistrationRetryException)\n" when trying to register number with captcha.

Are you using the latest released version?

  • Yes

Have you read the troubleshooting page?

  • Yes

What type of installation are you running?

signal-cli-rest-api Docker Container

In which mode are you using the docker container?

Normal Mode

What's the architecture of your host system?

arm64

Additional information

I'm trying to set up the docker container for homeassistant for a land-line number using this readme:
https://github.com/bbernhard/signal-cli-rest-api/blob/master/doc/HOMEASSISTANT.md

Using this line of code:
curl -X POST -H "Content-Type: application/json" --data '{"use_voice": true}' 'http://127.0.0.1:8080/v1/register/+43123456789

I get the reply:
{"error":"Captcha required for verification, use --captcha CAPTCHA\nTo get the token, go to https://signalcaptchas.org/registration/generate.html\nAfter solving the captcha, right-click on the \"Open Signal\" link and copy the link.\n"}

So I go to https://signalcaptchas.org/registration/generate, solve the captcha and get a link like:
signalcaptcha://signal-hcaptcha.5fad9...aEIVfjTLs4E

As descripted in the readme, I then do:
curl -X POST -H "Content-Type: application/json" -d '{"captcha":"signal-hcaptcha.5fad9...aEIVfjTLs4E", "use_voice": true}' 'http://127.0.0.1:8080/v1/register/+43123456789'

But here I only get the reply:
{"error":"Failed to register: StatusCode: 429 (RegistrationRetryException)\n"

I couldn't find any information about this error. The land-line number I use isn't registered for Signal yet (it's mine for over 10 years and I never tried a registration before).

Any idea what might be wrong?

Added:
Since the error is "RegistrationRetryException", I tried to figure out if the number has been registered (somehow):

http://127.0.0.0:8080/v1/receive/+43123456789

results in:

{"error":"User +43123456789 is not registered.\n"}

@Cangoo
Copy link
Author

Cangoo commented Nov 5, 2023

I found out that when deleting all files in /signal-cli-config/, the error "RegistrationRetryException" vanishes.

Can't check if it fully works because I get a "Rate limit exceeded"-error now. So waiting for that to vanish too...

@Cangoo
Copy link
Author

Cangoo commented Nov 6, 2023

Nope, still get {"error":"Failed to register: StatusCode: 429 (RegistrationRetryException)\n". Any ideas?

@A380Coding
Copy link

Got a bit of the same issue. For captcha you have to use the complete url (including signalcaptcha://), at least that worked for me. Now I'm stuck with the verification. Got the verification number via sms but I get "Verify error: StatusCode: 404" trying to verify it.
I also hit the rate limit now.

@Cangoo
Copy link
Author

Cangoo commented Nov 6, 2023

Hi and thanks for your reply and the hint with the signalcaptcha:// - very helpful.

I now managed to get the call for the verification number by doing this (see https://github.com/AsamK/signal-cli/wiki/Quickstart#set-up-an-account):

curl -X POST -H "Content-Type: application/json" --data '{"use_voice": false, "captcha":"signalcaptcha://signal-hcaptcha.5fad...Rk--Ro"}' 'http://127.0.0.1:8080/v1/register/+43123456789'

WAIT 60 sec

curl -X POST -H "Content-Type: application/json" --data '{"use_voice": true, "captcha":"signalcaptcha://signal-hcaptcha.5fad...YmYTv56fA"}' 'http://127.0.0.1:8080/v1/register/+43123456789'

The link above claims that Failed to register: [429] Rate limit exceeded: 429 (RateLimitException) might be an error if you are not doing this correctly (first use voice=false, then wait, then voice=true).

But now I'm stuck at the same point as you:
curl -X POST -H "Content-Type: application/json" 'http://127.0.0.1:8080/v1/register/+43123456789/verify/123-456'
=> {"error":"Verify error: StatusCode: 404\n"}

Do you now if the format for the code is '123-456' or '123456'? Okay, both didn't work...

@Cangoo
Copy link
Author

Cangoo commented Nov 6, 2023

Uh, oh, eh, although I got the verification-error, I'm now able to send messages. Yay!

@A380Coding
Copy link

What did you change to verify?

@Cangoo
Copy link
Author

Cangoo commented Nov 6, 2023

Not sure what did the trick. I tried:

curl -X POST -H "Content-Type: application/json" 'http://127.0.0.1:8080/v1/register/+43123456789/verify/123-456'

and

curl -X POST -H "Content-Type: application/json" 'http://127.0.0.1:8080/v1/register/+43123456789/verify/123456'

several times, I even called: http://127.0.0.1:8080/v1/register/+43123456789/verify/123-456 in the browser, always getting "Verify error: StatusCode: 404". I then out of fun tried to receive messages which suddenly worked.

Added: I tried to receive in browser by calling:
http://127.0.0.1:8080/v1/receive/+43123456789
and got an empty array [ ] back.

@mwllgr
Copy link

mwllgr commented Nov 6, 2023

Hey, got it working by waiting 60 seconds before setting use_voice to true too. I also removed the hyphen in the registration code in the verify URL.

@Cangoo
Copy link
Author

Cangoo commented Nov 7, 2023

Hello, I just tried it with another landline-number and it worked like charm on the first try using no hyphen in the code to verify the number.

@flocsi
Copy link

flocsi commented Nov 26, 2023

Does not work for me. Verifying results in "StatusCode: 404"

@bbernhard
Copy link
Owner

please try with Version 0.80

@flocsi
Copy link

flocsi commented Dec 28, 2023

Even with V 0.80, I receive "Verify error: StatusCode: 404" after entering the code I received via phone call.

@alexyao2015
Copy link

I found that I was getting 429 when I specified use_voice to true initially. It seems that you just set use_voice to false, make a request, then set use_voice to true. And only provide it a captcha after getting an error stating it is required. I also found that on my second attempt after setting use_voice to true, it required another request with the same payload to give me a successful response.

For me, the following worked:

  1. use_voice false without captcha
  2. use_voice false with captcha
  3. use_voice true without captcha ---> 429
  4. use_voice true without captcha ---> 201

@flocsi
Copy link

flocsi commented Mar 15, 2024

I get "StatusCode: 502 (ExternalServiceFailureException)". Perhaps, it is an issue with this particular landline number that has been used earlier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants