Google Calendar API - no longer authorized for reads?

Viewed 887

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.

2 Answers

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: enter image description here

Related