So, using the Calendar API to pull all events from a publicly available Google Calendar.
This were working fine until this morning.
As I'm not updating or doing any data alteration, we've implemented an API key to access read only data as follows:
https://www.googleapis.com/calendar/v3/calendars/[calendar ID]/events?timeZone=EDT&timeMin=2020-06-30T04:00:00.000Z&maxResults=6&singleEvents=true&orderBy=startTime&key=[API key]
Yesterday, pulled fine, today returns:
code: 401 message: invalid credentials
Any thoughts on this? It's affecting several implementations of this calendar code (different keys, domains, etc) but with the same basic methodology.
I have not implemented the gapi client javascript library, may begin looking into that now.
Enable API access In the API Manager pane, click Library to see the list of available APIs. In the Google Apps APIs list, scroll down to click or search for Calendar API, then on the API page, click Enable.
All use of the Google Calendar API is available at no additional cost.
The Google Calendar API is a RESTful API that can be accessed through explicit HTTP calls or via the Google Client Libraries.
You can't share calendars from the Google Calendar app. Settings and sharing. Under “Access permissions,” select Make available to public. Next to “Make available to public,” choose the level of access you want to give in the drop-down menu.
I don't like adding +1 type responses, but I also suddenly got errors using API keys for the Google Calendar API.
Looking in the Google Console you can see that "API keys" is no longer an enabled credential for the Google Calendar API.
I'm pretty sure it's a mistake as Google should notify everyone before such a huge change. I'm hopeful they find reports of this and it's a mistake that will correct itself soon.
Btw, for anyone else, this is the error returned by Googles API:
{
"error": {
"errors": [
{
"domain": "global",
"reason": "authError",
"message": "Invalid Credentials",
"locationType": "header",
"location": "Authorization"
}
],
"code": 401,
"message": "Invalid Credentials"
}
}
This is now fixed by Google. All API key usage should be working as normal.
Looks like they had some issues on their end:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With