When I input this url, https://www.codewars.com/api/v1/code-challenges/valid-braces?access_key=apiKey (apiKey is a variable for the actual key), into my browser, I'm able to view the data presented in JSON. However, I continue to receive this error message in my console:
XMLHttpRequest cannot load https://www.codewars.com/api/v1/code-challenges/valid-braces?access_key=apiKey. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin '' is therefore not allowed access.
Here's my current request:
$.ajax({
type: 'GET',
dataType: 'json',
url: 'https://www.codewars.com/api/v1/code-challenges/valid-braces?access_key=apiKey',
success: function(data) {
console.log(data);
},
error: function() {
console.log('failed');
}
});