I am trying to make a request to the Eventbrite API. I can successfully make a call from Postman (chrome extension similar to fiddler)
url: https://www.eventbriteapi.com/v3/users/me/owned_events
Header: authentication : Bearer Y5R3SQRPRZBULIHYQHTD
This successfully gets back what I'm looking for. When I try to make the same call through AngularJS
function getLiveEvents() {
return $http.get(url, {
cache: true,
headers: {
'Authorization': 'Bearer Y5R3SQRPRZBULIHYQHTD',
'Content-Type': 'application/x-www-form-urlencoded',
'Accept': '*/*',
}
}).then(function (response) {
return response.data;
});
}
I always get the error XMLHttpRequest cannot load https://www.eventbriteapi.com/v3/users/me/owned_events?status=live. The request was redirected to 'https://www.eventbriteapi.com/v3/users/me/owned_events/?status=live', which is disallowed for cross-origin requests that require preflight.
Is there something I can do with my AngularJS request so that it will be successful?
FYI: The access-token is real, I'm not concerned about someone using it because it's just a test account.