Google Calendar API - no longer authorized for reads?

。_饼干妹妹 提交于 2020-07-02 05:55:21

问题


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.


回答1:


This is now fixed by Google. All API key usage should be working as normal.

Looks like they had some issues on their end:




回答2:


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"
    }
    }



回答3:


Looks like Google is working on the issue. I found this in the G Suite Support Assistant, in the Admin Panel of my teams G Suite account. Calendar API Service Issue



来源:https://stackoverflow.com/questions/62659190/google-calendar-api-no-longer-authorized-for-reads

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!