Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

198
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda