The project aims to simulate some of Google's reCaptcha behavior. The service will be useful for development purposes when we do not have a website with a visual widget (e.g. work on the API) or for testing response codes.
- Node 14
- Typescript
Run container:
docker run vertisan/google-recaptcha-simulator:latest
then just send a request like for real Google reCaptcha:
POST http://localhost/recaptcha/api/siteverify
with Content-Type: application/x-www-form-urlencoded
and request data:
secret: <string>
response: <string>
secret
is checked only for: whether it exists and whether it is not empty, while response
can be used as follows:
- To test supported errors, just send
response
with code of this error, e.g.missing-input-secret
and you'll getsuccess: false
with this error. - Any other values that are not matches error codes will return the result as a valid captcha (
success: true
).
We are supporting all error codes provided by Google:
Code | Description |
---|---|
missing-input-secret |
The secret parameter is missing. |
invalid-input-secret |
The secret parameter is invalid or malformed. |
missing-input-response |
The response parameter is missing. |
invalid-input-response |
The response parameter is invalid or malformed. |
bad-request |
The request is invalid or malformed. |
timeout-or-duplicate |
The response is no longer valid: either is too old or has been used previously. |