Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

202
Views
Is there a way to fix Recaptcha for ReactJS not working

Im trying to add captcha to my react app and the front end works just fine as expected. but when the backend calls the api to verify the captcha response (api) i get the following response { success: false, 'error-codes': [ 'missing-input-secret' ] }. Now when i log the request to see what data is being sent. i get this image. as you can see the secret and response is being sent and my headers are correct but for some reason im getting an error.

heres my code:

const captchaRequest = await axios.post('https://www.google.com/recaptcha/api/siteverify', {
  secret: config.captchaSecretKey,
  response: captcha
}, {
  headers: {
    'Content-Type': 'application/json',
  }
});

const captchaResponse = captchaRequest.data;

if (!captchaResponse.success) {
  return res.status(401).json({
    message: 'captcha failed',
    success: false,
  });
}

If someone could please let me know what im doing wrong let me know.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!