I'm trying to get a list of events from a client's public calendar using v3 of Google's API. I entered the Calendar ID into the API Explorer, and I'm getting a positive result:
https://www.googleapis.com/calendar/v3/calendars/rpsj44u6koirtq5hehkt21qs6k%40group.calendar.google.com/events?key={YOUR_API_KEY}`
=> [List of events here, as expected]
To create an API key, I created a project in the Google Developer Console, created a Public API access key (APIs & auth > Credentials), and replaced {YOUR_API_KEY}
above with my actual key. I made sure that the Calendar API was turned on (APIs & auth > APIs). When I paste this URL in the browser, I get this error response:
{
"error": {
"errors": [
{
"domain": "usageLimits",
"reason": "accessNotConfigured",
"message": "Access Not Configured. The API is not enabled for your project, or there is a per-IP or per-Referer restriction configured on your API key and the request does not match these restrictions. Please use the Google Developers Console to update your configuration.",
"extendedHelp": "https://console.developers.google.com"
}
],
"code": 403,
"message": "Access Not Configured. The API is not enabled for your project, or there is a per-IP or per-Referer restriction configured on your API key and the request does not match these restrictions. Please use the Google Developers Console to update your configuration."
}
}
All the responses I've seen say that you need to make sure the Google Calendar API is turned on, and it definitely is (also, it's turned on by default). What am I missing here?
localhost:8888/*
in the Referers field) and it's now returning calendar events. – sea_monster