-1

I'm trying to fetch data from Blockchain API Here, it works only when i access the link using Chrome, but when i using jQuery .getJSON() i got this error message :

Access to XMLHttpRequest at 'https://chain.so/api/v2/get_tx_unspent/BTCTEST/mx96dAzepcd86VTyo4VshSmizyxAR7sJ6P' from origin 'http://localhost' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

I know this is because CORS, so i tried using CORS Plugin to solve it,but i am getting another error :

GET https://chain.so/api/v2/get_tx_unspent/BTCTEST/mx96dAzepcd86VTyo4VshSmizyxAR7sJ6P 503

after that i tried using postmant and i got meessage :

Please turn JavaScript on and reload the page.

Here is my code

url = 'https://chain.so/api/v2/get_tx_unspent/BTCTEST/mx96dAzepcd86VTyo4VshSmizyxAR7sJ6P'
$.getJSON(url,function(result){
        console.log(result);
    })

1 Answers1

-1

This URL is protected by cloudflare, so loading this URL through postman, Cloudflare detects Postman to not be a real browser, making it pass through a mid-page. The result you get from this call using Postman, is the cloudflare protection page.

trueicecold
  • 820
  • 10
  • 23