From e0cfbe09179749e4072031515a7cb55c4cfc6516 Mon Sep 17 00:00:00 2001 From: Evgeny Kornev Date: Thu, 3 Dec 2026 14:42:49 +0300 Subject: [PATCH] docs: add reCAPTCHA v2 token basics section --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index d3fe38f..c3a7ddc 100644 --- a/README.md +++ b/README.md @@ -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 |