API call with jQuery
I am trying to make an API call with jQuery but it seems like I miss something :/
I am using
$.getJSON('http://api.musescore.com/services/rest/score.json&oauth_consumer_key=KE…?')
.done(function(data) {...}).fail(function(error) {...});
when I open the link as a normal tab it shows me the response, but when I try it with jQuery I get "parsererror" but don't know what I should do against it.
Here you can look at it: http://codepen.io/A_A/pen/VmmpEd?editors=0011
Greetings
lindraupe
Comments
Please do not make your API key publicly available.
As for the solution: score.json& > score.json?
In reply to Please do not make your API by Thomas
Oh, forgot to scrap it :/
In reply to Please do not make your API by Thomas
When I use it on my website, can't everyone find it out anyway?
Can't you just look into the js files/look at the site requests made?
You want JSONP, ask for it. Use score.jsonp.
Here is a working sample:
http://codepen.io/anon/pen/LbbLyE?editors=0011
In reply to You want JSONP, ask for it. by [DELETED] 5
Thanks, it works =D
Could you be so kind and delete your pen and forget the key now? O.o