To complete the server-side setup for Google reCAPTCHA, send a POST request to Google's verification URL with your secret key and the response token. This verifies the user's response to ensure it's valid.
@@learning-axis Firstly, THANK YOU so much for your response. But please have patience with me. I understand the "client side integration"; it's the "server side integration" that I'm struggling with. How exactly do I send a POST request to Google's verification URL with the secret key and the response token? I have the secret key, but where/what can I get a "POST request", where/what is the Google "verification code", and where/what is the "response token"? Will truly appreciate your assistance. THANK YOU for your time.
@@e-jay6390 Response Token: This is generated after the user completes reCAPTCHA and is included in your form data. POST Request: To verify, send a POST request to Google’s verification URL: www.google.com/recaptcha/api/siteverify Example JavaScript: const responseToken = /* token from reCAPTCHA */; const secretKey = 'YOUR_SECRET_KEY'; fetch('www.google.com/recaptcha/api/siteverify', { method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, body: `secret=${secretKey}&response=${responseToken}` }) .then(response => response.json()) .then(data => { if (data.success) console.log('Verification successful!'); }); PHP: $responseToken = $_POST['g-recaptcha-response']; $secretKey = 'YOUR_SECRET_KEY'; $response = file_get_contents("www.google.com/recaptcha/api/siteverify?secret=$secretKey&response=$responseToken"); $responseKeys = json_decode($response, true); echo $responseKeys["success"] ? "Verification successful!" : "Verification failed!";
@@learning-axis THANK YOU for your reply once again, as well a your patience. Okay, so (an example) the POST REQUEST is the JavaScript you created. I see where I can place the SECRET KEY in the second field, so my questions are... - Where does this JavaScript go in the first place? On the same html page where the form was created or in a different html page altogether? - Where do I get the token from the reCAPTCHA to place it in the "const response Token =" field? Is it automatically generated in that field when the user clicks on the reCAPTCHA box? - And HOW exactly do I send this completed post to Google's verification URL? I know these questions may be tiresome, and the answers may even be elementary; but there really hasn't been any video out there which aptly explains this process. So once again, I will truly, truly appreciate your time and patience in assisting me. THANK YOU in advance.
@@learning-axis Hi, I didn't see anything about validation in the video, can you explain what we need to do or make another video??? Thank you so much.
You just cleared up my confusion. Thank you!!!!! Liked and subscribed.
Glad I could help! Thank you for the support!
Thanks a lot 👍👍👍
Thank you
you welcome
Nice movie clips
Nice bro
thanks bro
thanks, bro
BE BLESSED REV TD JAKE➕✴S
Thank you
Don't you need to implement the private key somewhere? Don't you have to do anything server side? Or is it really that simple?
"Yes, you need to implement the private key to validate the reCAPTCHA token with Google's API."
@@learning-axis Hi, I didn't see anything about that in the video, can you explain what we need to do or make another video??? Thank you so much.
🎉❤❤❤
Thanks for video
Please I want to learn and be as strong as you. Where to learn like you?
debes de agregar en dominios 127.0.0.1 si usas xamp, ya que si trabajar en frameworks como Laravel, no detecta el localhost.
Thnx bro❤❤
😍
how can i do to my submit button disabled if the captcha has not complete?
are bhai please apani voice ke sath video banao. please.
How can we use it without xampp server to implement above
aapki voice sunke samajhan chahte hai hum.
How do you complete the server s ide set-up using the secret key?
To complete the server-side setup for Google reCAPTCHA, send a POST request to Google's verification URL with your secret key and the response token. This verifies the user's response to ensure it's valid.
@@learning-axis Firstly, THANK YOU so much for your response.
But please have patience with me. I understand the "client side integration"; it's the "server side integration" that I'm struggling with.
How exactly do I send a POST request to Google's verification URL with the secret key and the response token?
I have the secret key, but where/what can I get a "POST request", where/what is the Google "verification code", and where/what is the "response token"?
Will truly appreciate your assistance. THANK YOU for your time.
@@e-jay6390 Response Token: This is generated after the user completes reCAPTCHA and is included in your form data.
POST Request: To verify, send a POST request to Google’s verification URL: www.google.com/recaptcha/api/siteverify
Example
JavaScript:
const responseToken = /* token from reCAPTCHA */;
const secretKey = 'YOUR_SECRET_KEY';
fetch('www.google.com/recaptcha/api/siteverify', {
method: 'POST',
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
body: `secret=${secretKey}&response=${responseToken}`
})
.then(response => response.json())
.then(data => {
if (data.success) console.log('Verification successful!');
});
PHP:
$responseToken = $_POST['g-recaptcha-response'];
$secretKey = 'YOUR_SECRET_KEY';
$response = file_get_contents("www.google.com/recaptcha/api/siteverify?secret=$secretKey&response=$responseToken");
$responseKeys = json_decode($response, true);
echo $responseKeys["success"] ? "Verification successful!" : "Verification failed!";
@@learning-axis THANK YOU for your reply once again, as well a your patience.
Okay, so (an example) the POST REQUEST is the JavaScript you created.
I see where I can place the SECRET KEY in the second field, so my questions are...
- Where does this JavaScript go in the first place? On the same html page where the form was created or in a different html page altogether?
- Where do I get the token from the reCAPTCHA to place it in the "const response Token =" field? Is it automatically generated in that field when the user clicks on the reCAPTCHA box?
- And HOW exactly do I send this completed post to Google's verification URL?
I know these questions may be tiresome, and the answers may even be elementary; but there really hasn't been any video out there which aptly explains this process.
So once again, I will truly, truly appreciate your time and patience in assisting me.
THANK YOU in advance.
I just tried this and if you don't click the recaptcha, it still submits the form!
You need to add validation to check if reCAPTCHA is completed before processing the form submission.
@@learning-axis Hi, I didn't see anything about validation in the video, can you explain what we need to do or make another video??? Thank you so much.
Bhai jo aap yeh coding karte ho short video m kaise karte ho yr
Sir inko apni blogger website me kaise use kre
sir ye reCaptcha ka file kaha se laye
google recaptcha sa
Qaraqalpaq sila
Source code❤
I will provide soon
Nice bro
thank you