diff --git a/Registration-with-captcha.md b/Registration-with-captcha.md index 508ca45..1cf7813 100644 --- a/Registration-with-captcha.md +++ b/Registration-with-captcha.md @@ -1,22 +1,43 @@ -Sometimes the Signal server requires a captcha token for registering a new account. -If your IP address is not deemed trustworthy enough, the registration fails with a captcha required error (`Captcha invalid or required for verification`). +The Signal server requires a captcha token for registering a new account. +If you try registering without one, it normally fails with a captcha required error (`Captcha invalid or required for verification`). -To get the token, go to https://signalcaptchas.org/registration/generate.html - -If the token from that page doesn't work, you can try https://signalcaptchas.org/challenge/generate.html - -After filling the captcha, the site doesn't show the token but redirects to a `signalcaptcha://` url that contains the token. On mobile devices that url is handled by the apps. -To see the URL you can open the browser developer tools (F12) before completing the captcha. -Hint: Enable the option "Persist Logs" in the "Console Settings" to prevent clearing the console each time navigating to a new page. - -Check the console in the developer tools for a redirect starting with `signalcaptcha://` -Everything after `signalcaptcha://` is the captcha token (INCLUDING the `signal-recaptcha-v2.6LfBXs0bAAAAAAjkDyyI1Lk5gBAUWfhI_bIyox5W.registration` part). -![](https://user-images.githubusercontent.com/292790/113993106-a8cd5280-9886-11eb-9380-4afe7b71482f.png) - -Then execute the `register` command again with the `--captcha` argument (https://github.com/AsamK/signal-cli/blob/master/man/signal-cli.1.adoc#register) +## Register with captcha token +When you have the captcha code, execute the `register` command again with the `--captcha` argument (https://github.com/AsamK/signal-cli/blob/master/man/signal-cli.1.adoc#register) ``` signal-cli -u USERNAME register --captcha signal-recaptcha...03AG...Uonw ``` If you do not get any error, you can proceed with the verify command. If you get the error `Invalid captcha given.`, try to get the captcha again (the captcha is good for a short period of time). + +## Get captcha token +To get the token, go to https://signalcaptchas.org/registration/generate.html + +(If the token from that page doesn't work, you can try https://signalcaptchas.org/challenge/generate.html) + +After filling the captcha, the site doesn't show the token but redirects to a `signalcaptcha://` url that contains the token. + +How to see the captcha token depends on whether one of the official apps (Desktop/iOS/Android) is installed. Because in that case the `signalcaptcha://` url scheme is handled by the apps and the captcha cannot be seen directly. + +### No official app installed +To see the URL you can open the browser developer tools (F12) before completing the captcha. +Hint: Enable the option "Persist Logs" in the "Console Settings" to prevent clearing the console each time navigating to a new page. + +Check the console in the developer tools for a redirect starting with `signalcaptcha://` +Everything after `signalcaptcha://` is the captcha token (INCLUDING the `signal-recaptcha-v2.6LfBXs0bAAAAAAjkDyyI1Lk5gBAUWfhI_bIyox5W.registration` part). +![image](https://user-images.githubusercontent.com/2340865/173323641-0712b258-0a3b-4814-940e-b23b1ce8bd5c.png) + +### Get token from network request + +To see the URL you can open the browser developer tools (F12) before completing the captcha and navigate to the network tab. +The request which includes the captcha token (upon successful completion of the captcha challenge) is a POST with the following path: https://www.google.com/recaptcha/enterprise/userverify. The response includes just the captcha token in the json under key "1". The request includes the 40 character site key for signalcaptchas.org which is 6LfBXs0bAAAAAAjkDyyI1Lk5gBAUWfhI_bIyox5W. See screenshots below. + +To get a complete captcha token, prepend `signal-recaptcha-v2.6LfBXs0bAAAAAAjkDyyI1Lk5gBAUWfhI_bIyox5W.registration.` to the token from the request (`03AG...motOQ`) + +![image](https://user-images.githubusercontent.com/2340865/173322145-9533cbb1-f7d8-4984-8134-c02787f515db.png) + +![image](https://user-images.githubusercontent.com/2340865/173324677-7943803b-3fad-41a0-baff-ab5ac5cb0383.png) + +### Register custom protocol handler + +See [#701](https://github.com/AsamK/signal-cli/issues/701) or [#724](https://github.com/AsamK/signal-cli/issues/724) for some suggestions. \ No newline at end of file