Explore Courses Blog Tutorials Interview Questions
0 votes
in Blockchain by (4.1k points)

I am trying to create wallet on Blockchain using Ajax but I am getting "Cross-Origin Request Blocked" error. My Ajax call is:

                    type: 'POST',
                    url: '',
                    data: "cors=true&email="+email+"&password="+password+"&api_code="+code,
crossDomain: true,

                    success: function (data) {



When I post this I get error Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at This can be fixed by moving the resource to the same domain or enabling CORS.

On Blockchain they say that Some API calls are available with CORS headers if you add a cors=true parameter to the request

I have tried everything, I have tried to send this parameter as a GET as well as POST parameter, I have tried jsonp. I have also tried with the header Access-Control-Allow-Origin * but nothing seems to be working. Can anyone confirm if he managed to create blockchain wallet using Ajax call or they don't support CORS for this. Any help will be much appreciated.



1 Answer

0 votes
by (14.4k points)
edited by

I believe that blockchain has no support for the CORS error for the wallet API. I can say this because to me your code is correct and should execute fine. Actually, the blockchain wallet API docs do not specify calls available via CORS through the cors=true query parameter.

Know Blockchain better with Blockchain Training by Intellipaat.

Related questions

Browse Categories