trying to access an api with angularjs:
eg.
footballdataAPI.getTeams = function() {
$http.defaults.headers.common['Auth-Token'] = '613a6b6937394ae8a94d69f358f76902';
return $http.get('http://www.football-data.org/alpha/soccerseasons/398/leagueTable?callback=JSON_CALLBACK');
};
But I get the console error:
XMLHttpRequest cannot load http://www.football-data.org/alpha/soccerseasons/398/leagueTable?callback=JSON_CALLBACK. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://alexanderlloyd.info' is therefore not allowed access.
Do they need to allow requests from my domain on their side? Or is there something I can add to make this work ad they have already given me an authorisation token as shown in the code.
Thanks!