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

134
Vistas
Why is my Discord Webhook throwing POST Error 400?

I'm trying to figure out why this is throwing me a 400 on POST, this is inside of a submit event listener for a form on my website. The form itself works as expected and emails me the appropriate data, but this webhook integration is failing and I'm not sure why.

const webhookBody = {
    embeds: [{
        title: 'Contact Form Submitted',
        fields: [
            { name: 'From:', value: nameForm.value },
            { name: 'Email:', value: emailForm.value },
            { name: 'Message:', value: messageForm.value }
        ]
    }],
};

const webhookUrl = 'myWebhookURL';

fetch(webhookUrl, {
    method: 'POST',
    headers: {
        'Content-Type': 'application/json',
    },
    body: JSON.stringify(webhookBody),
})
.then(data => console.log(webhookBody));

The console gives back the object, but the field values are returning as empty strings. Maybe this has something to do with it?

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