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

153
Views
Unable to access JSONBin.io even I have added the Auth Headers

So, basically, I am trying to get data from JSONbin.io. I have set the RequestHeader before I send the request. As you see there's beforeSend and xhr.setRequestHeader("X-Master-Key", "$2b$10$QCzFeVffyq7vaiSBUfPbCeXUGV.IBpiHlWIOsDQAgj########");. But, it still say Error 401 aka unauthenticated request. I wondering if someone can help me with this. I also provide image that show that the headers is there.

Link: https://jsonbin.io/api-reference

Image: https://ibb.co/jGtFLk9

    <script>
      function getKey() {
        $.ajax({
            url: 'https://api.jsonbin.io/b/624efc9cd8a4cc06909d66cd/2',
            type: "GET",
            dataType: "json",
            beforeSend: function(xhr) {
                xhr.setRequestHeader("X-Master-Key", "$2b$10$QCzFeVffyq7vaiSBUfPbCeXUGV.IBpiHlWIOsDQAgj########");
            },
            success: function(data) {
                const keyStore = data.keys;
                var copyKey = document.getElementById("KeyDisplay");
                document.getElementById('KeyDisplay').value = keyStore[Math.floor(Math.random() * 49)]
                document.getElementById('Button').textContent = "Copied Key"
                document.getElementById("Button").disabled = true;
                copyKey.select();
                navigator.clipboard.writeText(copyKey.value);
            }
        });
      }
    </script>
    ```


  [1]: https://i.stack.imgur.com/zQxGv.png
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!