I'm creating a website that makes use of the google calendar events API.
If I go to: https://developers.google.com/google-apps/calendar/v3/reference/events/list I can retrieve the events without any problem.
When I try to use GET https://www.googleapis.com/calendar/v3/calendars/myacc-3483%40pages.plusgoogle.com/events?key={YOUR_API_KEY}
it's not working.
I registered an app in the google developer center
API key AIzaSyDvAwN5oqjCvdYZvfPeW0mUrfzyBn9KmrI
Referers http://www.*****.be/
Activation date Jan 5, 2014 5:02 AM
Activated by *****
I'm using my e-mail adress as the CalendarID (which is working on the above website) and I'm making a request from my domain:
var url = 'https://www.googleapis.com/calendar/v3/calendars/myacc-3483%40pages.plusgoogle.com/events?key=AIzaSyDvAwN5oqjCvdYZvfPeW0mUrfzyBn9KmrI';
$.ajax({
url: url,
type: 'get',
success: function(data) {
alert(data);
}
});
Console output: GET https://www.googleapis.com/calendar/v3/calendars/myacc-3483%40pages.plusgoogle.com/events?key=AIzaSyDvAwN5oqjCvdYZvfPeW0mUrfzyBn9KmrI 403 (Forbidden)
I'm not sure what I'm doing wrong, everything seems to be correct..