fullcalendar: Google Calendar gives "Invalid Credentials" error

Bug Reports

googleCalendar plugin just stopped working. None of the Google Calendar events are fetched anymore -> 401 error. I didn’t change anything in my website.

Here are the code to reproduce the error : https://codepen.io/wawan_/pen/ExPbVZz?editors=1111 /!\ You need to add the googleCalendar plugin and enter a Google Calendar API Key

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 6
  • Comments: 17 (4 by maintainers)

Most upvoted comments

I’m using OAuth for my application via Google Sign-in and still having this issue with FullCalendar. I’m able to grab the current logged in user’s calendar and add it to FullCalendar via eventSources > events, but trying to add a Google Calendar via the google-calendar plugin—specifying the googleCalendarApiKey and a googleCalendarId under eventSources—is not working anymore and I’m getting this original error as described above. And like I mentioned before, this broke today—it was working fine yesterday.

According to the Google calendar API documentation, only OAuth 2.0 is currently supported.

Your application must use OAuth 2.0 to authorize requests. No other authorization protocols are supported. If your application uses Google Sign-In, some aspects of authorization are handled for you.

Perhaps Google is now enforcing this requirement.

As many use cases would be such that you don’t want to prompt people for authorization, it seems like use of a service account is going to be needed.

https://developers.google.com/identity/protocols/oauth2/service-account

According to the Google calendar API documentation, only OAuth 2.0 is currently supported.

Your application must use OAuth 2.0 to authorize requests. No other authorization protocols are supported. If your application uses Google Sign-In, some aspects of authorization are handled for you.

Perhaps Google is now enforcing this requirement.

Same here. This is the API response:

{
 "error": {
  "errors": [
   {
    "domain": "global",
    "reason": "authError",
    "message": "Invalid Credentials",
    "locationType": "header",
    "location": "Authorization"
   }
  ],
  "code": 401,
  "message": "Invalid Credentials"
 }
}

Google Calendar API is requiring OAuth2 access only now?