Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

198
Visualizações
HTML / JAVASCRIPT not sending data to Discord Webhooks

After some research, I found out how to send data to Discord Webhooks. Even though its executing, it wont send the webhook message? Does anyone know why?

  <label for="title">Title:</label><br>
  <input type="text" id="title"><br>
  <label for="desc">Description:</label><br>
  <input type="text" id="desc">
  <div></div>
  <label for="opmes">Message(optional):</label><br>
  <input type="text" id="opmes">
  <br><br>
  <input type="submit" value="Submit" onclick="sendMessage()">
<script>
    function sendMessage() {
      const request = new XMLHttpRequest();
      request.open("POST", "you really wanted my webhook huh?");

      request.setRequestHeader('Content-type', 'application/json');

      const params = {
        username: "My Webhook Name",
        avatar_url: "",
        content: "The message to send"
      }

      request.send(JSON.stringify(params));
    }
</script>

the errors are:

OPTIONS webhook_url_lol_you_thought
CORS Missing Allow Origin

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at hwebhook_url_lol_you_thought. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing). Status code: 403.

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at webhook_url_lol_you_thought. (Reason: CORS request did not succeed). Status code: (null).
about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda