API request with ajax

I'm trying to do a get request with ajax to get the product details, but I got CORS error

Access to XMLHttpRequest at 'https://judge.me/api/v1/products/5x11-back-in-black-500-sheets' from origin 'http://localhost:8080' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.

I tried from localhost, from a webserver, from shopify and I got the same

using postman works

Do I need something extra in the request?


here the jquery example

let url = "https://judge.me/api/v1/products/5x11-back-in-black-500-sheets";                        


          url: url,

                      type: 'GET',

                       data: raw,

                       crossDomain: true,

                       dataType: "json"

        }, {

     success: function(data) {



     error: function(err) {




Hello Pedro,

Thank you for reaching us.

For security reason we don't support Ajax API request as the request contains token data.

Should you have any concerns, please let us know.


I'm creating a custom app that only uses HTML, JS and CSS - does the OAuth approach allow for network requests through the Fetch API in Javascript? 

Login or Signup to post a comment