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

194
Views
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
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!