Goole Calendar plugin Unauthorized error

Hello,

I am trying to create a simple integration between my Bubble app and Google Calendar using the free plugin Calendar from Google by Zeroqode (Calendar from Google Plugin | Bubble). The only functionality I need is the possibility to create Google Calendar events from my app.

I have created a simple test with two buttons: Sign up/Login with Google & Create Calendar.

If I click the Create Calendar Event button without previously having logged in I receive the expected error message:

{
  "error": {
  "code": 401,
  "message": "Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.",
  "errors": [
  {
    "message": "Invalid Credentials",
    "domain": "global",
    "reason": "authError",
    "location": "Authorization",
    "locationType": "header"
  }],
  "status": "UNAUTHENTICATED"
  }
}

However after login in through the Signup/Login with Google Calendar button, and successfully granting permissions to my app using the OAuth consent screen (I still need it to be verified but it shouldn’t affect, also I cannot get it verified without providing an example authentication flow) I still get the same error message when trying to create a calendar event.

I have enable the Google Calendar API in the cloud console, I successfully created OAuth credentials and I checked on my third-party allowed apps in my personal google account that my app was effectively given access to manipulate Google Calendar. Additionally I have disabled all adblocker software that perhaps could be blocking any cookies or credentials being passed.

The only thing I can think of is the plugin does not properly store the authorization code and/or token later.

Thank you

Hi, were you able to fix this error?

Same issue, trying to solve still.

Hello,

Yes, there was a problem with the Oauth redirections, I was not taking into account the full URL the oauth redirection should take. I was forgetting a GET parameter. Be sure to include the exact OAuth Urls

Could you explain a little more in detail? I didn’t quite understand how to solve it