Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ pytest -q
- **Same session end to end.** Cookies from the GET request and the `Referer` header go with the POST. Many backends reject a valid token if the session that loaded the form is not the one that submits it.
- **Payload instead of DOM.** `build_payload()` adds `g-recaptcha-response` exactly as the browser widget would post it, so the server cannot tell the difference between the two flows.

## reCAPTCHA v2 token basics

- The token is a `g-recaptcha-response` string. Send it in the form payload under that name.
- reCAPTCHA v2 tokens are single-use and short-lived. Request a new token for every submission and submit right away.
- Pass the same page URL and sitekey that the browser used, otherwise the token can be rejected on validation.

## Common errors

| Symptom | Cause and fix |
Expand Down
Loading