mirror of
https://github.com/aljazceru/signal-cli-rest-api.git
synced 2025-12-18 23:24:20 +01:00
Add info on captcha verification
This commit is contained in:
@@ -17,6 +17,16 @@ e.g:
|
||||
|
||||
`curl -X POST -H "Content-Type: application/json" --data '{"use_voice": true}' 'http://127.0.0.1:8080/v1/register/+431212131491291'`
|
||||
|
||||
- Register a number (with captcha)
|
||||
|
||||
When you try to register a number, if you receive a response like `{"error":"Captcha required for verification (null)\n"}` then Signal is requiring a captcha. To register the number you must do the following:
|
||||
1. Go to [https://signalcaptchas.org/registration/generate.html](https://signalcaptchas.org/registration/generate.html)
|
||||
2. Open the developer console
|
||||
3. Find the line that looks like this: `Prevented navigation to “signalcaptcha://{captcha value}” due to an unknown protocol.` Copy the captcha value
|
||||
4. Use it to make the registration call like this:
|
||||
|
||||
`curl -X POST -H "Content-Type: application/json" -d '{"captcha":"{captcha value}"}' 'http://127.0.0.1:8080/v1/register/<number>`
|
||||
|
||||
- Verify the number using the code received via SMS/voice
|
||||
|
||||
`curl -X POST -H "Content-Type: application/json" 'http://127.0.0.1:8080/v1/register/<number>/verify/<verification code>'`
|
||||
|
||||
@@ -57,6 +57,14 @@ e.g:
|
||||
|
||||
`curl -X POST -H "Content-Type: application/json" 'http://127.0.0.1:8080/v1/register/+431212131491291/verify/123-456'`
|
||||
|
||||
When you try to register a number, if you receive a response like `{"error":"Captcha required for verification (null)\n"}` then Signal is requiring a captcha. To register the number you must do the following:
|
||||
1. Go to [https://signalcaptchas.org/registration/generate.html](https://signalcaptchas.org/registration/generate.html)
|
||||
2. Open the developer console
|
||||
3. Find the line that looks like this: `Prevented navigation to “signalcaptcha://{captcha value}” due to an unknown protocol.` Copy the captcha value
|
||||
4. Use it to make the registration call like this:
|
||||
|
||||
`curl -X POST -H "Content-Type: application/json" -d '{"captcha":"{captcha value}"}' 'http://127.0.0.1:8080/v1/register/<number>`
|
||||
|
||||
## Sending messages to Signal Messenger groups
|
||||
|
||||
The `signal-cli-rest-api` docker container is also capable of sending messages to a Signal Messenger group.
|
||||
|
||||
@@ -401,6 +401,7 @@ func (a *Api) About(c *gin.Context) {
|
||||
// @Success 201
|
||||
// @Failure 400 {object} Error
|
||||
// @Param number path string true "Registered Phone Number"
|
||||
// @Param data body RegisterNumberRequest false "Additional Settings"
|
||||
// @Router /v1/register/{number} [post]
|
||||
func (a *Api) RegisterNumber(c *gin.Context) {
|
||||
number := c.Param("number")
|
||||
@@ -452,7 +453,7 @@ func (a *Api) RegisterNumber(c *gin.Context) {
|
||||
// @Success 201 {string} string "OK"
|
||||
// @Failure 400 {object} Error
|
||||
// @Param number path string true "Registered Phone Number"
|
||||
// @Param data body VerifyNumberSettings true "Additional Settings"
|
||||
// @Param data body VerifyNumberSettings false "Additional Settings"
|
||||
// @Param token path string true "Verification Code"
|
||||
// @Router /v1/register/{number}/verify/{token} [post]
|
||||
func (a *Api) VerifyRegisteredNumber(c *gin.Context) {
|
||||
|
||||
Reference in New Issue
Block a user