Closed jyothisjose closed 2 years ago
I have this same issue currently. I installed it using Home Assistant and I also installed it on a dedicated container in my docker environment. Same response {"error":"Captcha invalid or required for verification (null)\n"}. both times.
I have this same issue currently. I installed it using Home Assistant and I also installed it on a dedicated container in my docker environment. Same response {"error":"Captcha invalid or required for verification (null)\n"}. both times.
Looks like that you need to provide a captcha
(see details here: https://github.com/bbernhard/signal-cli-rest-api/issues/19)
That's true. You must provide captcha
curl -X POST -H "Content-Type: application/json" --data '{"captcha": "<captcha>"}' 'http://127.0.0.1:8080/v1/register/+1234567890'
We have used captcha from https://signalcaptchas.org/registration/generate.html and executed following command.
_curl -X POST -H "Content-Type: application/json" --data '{"captcha": "03AGdBq263LoI21mz7kUvZRp_WuzeIDjG-zo2v7QF_R4-GeJEYUtq1OqlKuBqNVONxe3-Kxt8E4v12TuiIkylLCzPBba6GUm-bpTqWVbfJ97ecjBg_52iZ9Q9XrOMBXdO0ORuFSL-vNS9Z57e9xM6RMXFxLTHEcJiXoROlVvnrw1TxX-punYMpivgy-naQrNE3LjmOj1vKgMiRtN1aNFEwSaJ_zPLcAX8sZtKfMpnjtq5Wr1rGp9DIBB0xGir7AyyfnFZmiGAW5TIfI5etMKmpg6V1or3ekF4Ft3lLEy77uyPuLD3wHd59FyfJAFFHFqnYJV5Y8jnU0jIY8C_LgzQImh6HqGIav8kNK6V1140XuGCdkLNASSgU8AFQtzrEGM2RW3tilxDm6vKlvHnI9r8Sc6O6iDSXbSqhX8bhPKSUxMGiekPFqAqmD3KyAjSoKCCOyzmiEvV1OIIwkZsehCvKu7P2nINBy4Tjw"}' 'http://127.0.0.1:8080/v1/register/+91xxxxxxx'
Still we are getting same error {"error":"Captcha invalid or required for verification (null)\n"}j
Can you please help us to solve registration issue?
@jyothisjose how many times have you tried your command above? just once or more? mentioned here https://github.com/bbernhard/signal-cli-rest-api/issues/19#issuecomment-772827785 that he tried 4-5 times. Hope that helps.
For me, I try with succes on my first time.
This is the closest that I've been thus far:
I just don't know what syntax I'm messing up. Here's the latest Captcha:
Here's the latest attempt, which says that the captcha is invalid trying it with and without the //:
Thanks for any guidance that anyone has!
I've been hopping around from project to project but I do not think any of them require signalcaptcha://
Try only the character after signalcaptcha://
that is "signalcaptcha://<this only>"
Make sure you are using a recent captcha too.
On mobile so I can check later in practice
Awesome, I'll try it out in about an hour and post back. Thanks!
I've been hopping around from project to project but I do not think any of them require signalcaptcha://
Try only the character after signalcaptcha:// that is "signalcaptcha://
Make sure you are using a recent captcha too.
On mobile so I can check later in practice
— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/bbernhard/signal-cli-rest-api/issues/89#issuecomment-792381801, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ARHXWQQQIXTWBVV7BWQHFI3TCQI3HANCNFSM4XOFHB2Q.
Unfortunately, if I do it without the prefix, it fails with the following error:
In looking at the error on the container, it shows the following:
So it at least sees it as a key. I tried a few things after that, based on the error, but nothing seemed to work. Closer at least. Any suggestions?
Thanks, Eric
That's true. You must provide captcha
curl -X POST -H "Content-Type: application/json" --data '{"captcha": "<captcha>"}' 'http://127.0.0.1:8080/v1/register/+1234567890'
@EJansenMSFT mate... You didn't follow the JSON structure as per this....
The "value" in "key:value" pair is the captcha. You are missing "captcha":
(literally)
Also, if you are using single quotes ('
) pretty sure you do not need to escape the double quotes ("
) i.e. don't so \"
But definitely wrong with out the key"captcha":
before your captcha
I had '{"captcha": "
If you were to modify the following, what would you change?
curl -X POST -H "accept: application/json" -H "Content-Type: application/json" --data '{"captcha":"03AGdBq25uKao8EWXvnhILvYnRf4hGQPI7-FBdF8iIZ_ChgkesTMt2iuzqxgZHjEfv_gGerR6WlaWCQlep48Mforf-zB1NjTPR3KaSOejI0q5imeD0qkc-DuU6nLWqticD_orvyVvWBWWprevHGJ336gcqzjETBKM1xsvF6AnL3lrjVC0pbcgUX_ycwWUAZ4PB7yt2YJ-ZG53Ja6h5KA8oHNfZk2gED3WBtY1lOXcutVwrUA1VG24l-YooV3aM6hrzsARD9Iw6O7ciKaDUOo_Vy3YQOX6RsFnnRInT1Jz1L0PJcT3Nhu_kYKPdJN8rur_ivj5iezwwpkYM6llRd53XVC12uQwW7-F6vCllGep4R-7OI9FLSkjiEIj-kwbr1hve4a6CRXYPpbH6szdPd9Fe-UsLR-PilE1bpVcT0MheJipV5rW2lp42-6NzRdZ6ztPSgXIOrL_XEjyH5F9d8EOeWxpdw5RpbICBrA"}' 'http://127.0.0.1:8080/v1/register/+1...........'
Cheers, Eric
@EJansenMSFT I copy and pasted what you have above with nothing more than my number and a new captcha and it worked.
It's making a bit more sense to me. You are on PowerShell making the request. I have to assume it is not as standard as *nix CuRL.
Recommendation for you to make this less error prone and more repeatable:
curl -X POST -H "Content-Type: application/json" --data '{"captcha": "<captcha>"}' 'http://127.0.0.1:8080/v1/register/+1234567890'
+1234567890
<captcha>
from "signalcaptcha://<captcha>"
(do not copy the quotes or beginning of the URI!!)<captcha>
in the body {"captcha": "<captcha>"}
(make sure you leave the double quotes!!!)Thanks for the detailed write up. Definitely appreciate you!
I tried it a few times, but it doesn't want to play nice. Here's the latest captcha and screenshots from Postman and the Container:
I'll keep playing with it.
Thanks again!
Do you see any output in Postman after executing the API call? Besides the 400
status code, there should also be an error message returned from the REST API. Something like {"error": "...."}
Hmm, I tried it a few more time, and generated a new captcha, and now it worked. No further changes.
Have no idea why it all of the sudden worked.
If the attempt fails using a captcha one time, should I have been generating a new captcha every single time? If so, maybe that's part of it.
If the attempt fails using a captcha one time, should I have been generating a new captcha every single time? If so, maybe that's part of it.
Creating a new captcha is definitely recommended!
I don't know the details about the captcha handling mechanism on the server side, but if I would implement something like this, I would probably set a pretty short expiration date to prevent abuse by scripts. So, one problem could have been that you just were too slow.
Do you see any output in Postman after executing the API call? Besides the 400 status code, there should also be an error message returned from the REST API.
No errors that I could see in Postman or on the Container.
No errors that I could see in Postman or on the Container.
That's strange. I've checked again in the sourcecode: The error isn't logged (so you won't see it in the container log file), but should be reported back via the REST API. But as it has worked now for you, I guess it was just some error from the Signal Server telling you that the captcha was wrong.
I did get a text message to my phone with the six digit pin, but the pin fails :(
How many times can I attempt to use the pin before I have to try to re-register my phone to get a new pin?
Is the syntax correct?
Thanks!
I did get a text message to my phone with the six digit pin, but the pin fails :(
How many times can I attempt to use the pin before I have to try to re-register my phone to get a new pin?
Is the syntax correct?
Thanks!
I've removed your screenshot, as you've accidentally leaked your phone number.
Are you sure that you need to set the pin
? Or in other words: Are you using a new SIM card or was it already in use with Signal?
Ah whoops, preciate that. Yeah the phone is already registered with Signal.
Yeah the phone is already registered with Signal.
Is the number still in use? Signal doesn't allow the number to be registered on multiple devices. So, if there's already a client (e.g your smartphone) using the number, you either have to use a dedicated SIM card for the REST API (personally I find that the better option) or link your device (there's a dedicated REST API endpoint for linking devices).
In case the number was previously used by another client, but is not anymore you are good to go.
Yeah the number is still in use. Right now I'm just testing the functionality, so I'd have to go buy another sim. Hmm, so how can I register container / device? Essentially what I want to do is write PowerShell wrappers around everything so I can send secure notifications for something like a network outage etc.
Yeah the number is still in use. Right now I'm just testing the functionality, so I'd have to go buy another sim. Hmm, so how can I register container / device? Essentially what I want to do is write PowerShell wrappers around everything so I can send secure notifications for so mething like a network outage etc.
I do not have any experience with linking devices, so I most probably can't help you troubleshoot in case you are running into problems. But there are some people out there that have successfully linked their devices.
It basically works like this:
http://127.0.0.1:8080/v1/qrcodelink?device_name=mydevice
See also this thread here: https://github.com/bbernhard/signal-cli-rest-api/issues/35
That goes back to my original issue, where though I can use curl, I can't actually connect using the browser for some reason:
Disregard, got the curl equivalent working and it generated a QR code.
Unfortunately when I try to link the device in Signal from my cell phone, it just gives a network error.
I found another phone to use though that's not registered with Signal :)
after last update I must reregister my number:
root@ha:/var/log# curl -X POST -H "Content-Type: application/json" 'http://127.0.0.1:8080/v1/register/+MY NUMBER'
{"error":"Captcha required for verification, use --captcha CAPTCHA\nTo get the token, go to https://signalcaptchas.org/registration/generate.html\nCheck the developer tools (F12) console for a failed redirect to signalcaptcha://\nEverything after signalcaptcha:// is the captcha token.\n"}root@ha:/var/log#
root@ha:/var/log# curl -X POST -H "Content-Type: application/json" -d '{"captcha":"03AGdBq25HWvcvFF1FfyR8ukURWy94H73t1Y_Phwj54wPWpF5hCyK3LTaTSptn5r2c3obXWNXfGvCDCg5hZe6gssDURFaKtZlLYIb9OLoE6ifoD657mSUdpA0xw7cvKjgAd5-VnRL-fbkXHOW28Rypoc-9Q49QjxRL7AMPENTFRbj-TBBzKahfvlHu2WEphZPiUj3FW7tlGSTVn6JNHMC9_K5nFednZMHqdW72OzyHcE3gueMc_SiTinvUYrVVUtnRpX0Zj9_PRCiSRY-lyJjq41LeEXRldjtZIgNwLPySOOz8bQs15VVGAFhHS82Ry71ilrwdLurB2pP3WBwkEDFJiHZKZbOCIcrHZjSlKsZgtDmfrbYqAJJtFMrj8aPVPsqkKW6I56zUhvue2Qt2rsBSMI0_mznU8yjtX9To-wgPgfB3DrKlY46jfXvJ2DoRZz-qCD-y1wGwTfstTTBSRRZ_J0yjdEhcPyrEIA"}' 'http://127.0.0.1:8080/v1/register/+MY NUMBER'
root@ha:/var/log#
No errors. But when I want send a message in log I see this:
2021-03-14 21:07:18 ERROR (SyncWorker_28) [homeassistant.components.signal_messenger.notify] ERROR App - User +MY NUMBER is not registered.
Have you verified the registration with the verification code you received via SMS?
Have you verified the registration with the verification code you received via SMS?
ahh that was last part I forgot! Thanks
Should be fixed. Please re-open in case it's still an issue.
On registering a phone number with signal, we are getting following error
{"error":"Captcha invalid or required for verification (null)\n"}.
We are using curl -X POST -H "Content-Type: application/json" 'https://127.0.0.1:8080/v1/register/v1/register/+PHONE_NUMBER_COUNTRY_CODE'