Forum Academy Marketplace Showcase Pricing Features

Google Calendar API use case

On the above, was able to fix it. I think I was trying to get “new” refresh tokens too soon - it seems Google won’t share a new refresh token instantly after you revoke access for some reason…

mebeingken - thank you so much for the step by step in setting up these google Oauth2 calls. Helped me so so much!

Thank you a lot @mebeingken ! Your post is a huge value for the community !

I was stuck at the beginning because i didn’t revoke all google permissions through , maybe add it at the access_token step :slight_smile:

Thanks again Ken !

I’m truly a “no coder” and It looks like google updated their list of questions since this string was produced so I get stuck on questions like this. My intuition says to select " Web server?" Can anyone help me pick the correct option.

Hey all,

Amazing post by mebeingken. The detail is amazing. I have a question that hopefully is an easy one. I have my tokens up and running. I can display signular info from the API like contacts count but I don’t know how to get the repeating info to display then in Bubble. I set up a repeating group but the Data Source is never right. Any ideas?

Sorted. Looking at the reponse i spotted the contact list is in feed entryScreenshot 2021-01-30 at 15.00.45

hi @mebeingken,

sorry to bother—still learning over here and couldn’t find any documentation. What do max-results, v, and start-index represent in your setup?

I’ve configured everything correctly for the Google Calendar API, but for some reason I am receiving almost none of my events for January or the future. But pre December 31st, I am pulling in everything.

Any thoughts?


I created my own thread about this, but I was wondering what anyone would recommend when you encounter your user not actually saving inside the program.

I’ve followed everything exactly, and my users can initialize, but they do NOT save - in debug mode it shows that the user is not signed in, but still runs the flows as if the customer was. So, I’m collecting data on a user that successfully authenticated, but not able to actually capture the user. HMMM…

**A little workaround, although not the end goal, is to simply have a user create an account on your site through the traditional method, and then having them link their account through a button on their dashboard… It works!

Hello, I am trying to get authentication for the Google Calendar, but I am stuck. I have been getting the following error

I have followed these steps:

It would be greatly appreciated if you could provide me some guidance! @Noqode do you have any suggestions?

Thank you so much in advance for your time!

is this your experience all the time? i put together an auth user-agent flow that signs in and authenticates just fine but for some reason, bubble wont just refresh the token sometimes

i get this issue from time to time

I have users, that once verifying and once their info is stored in the database, will not interact with the app for some weeks. Although this should be fine because we’re using the offline method - how do I ensure that users will not receive an API error once they decide to come back to the app?

Is this accomplished through a workflow where the scheduled time is set to the user’s expiry date time?

Need help, thanks :slight_smile:

I’m dealing with the same issue. I think having the app check when the user last logged in and if it’s been over an hour or two or a day or however long it needs to be based on the last login time log the user out and log back in in a single workflow.

@jared.gibb I’ve been testing where I created a recurring workflow and that seems fine. I just have it set to run a minute before it expires. Shouldn’t be an issue but now I’m worried I’ll blow my daily quota.

1 Like


THanks for the response. I would assume then that you are not using the “user-agent flow”? This is what I’ve been struggling with.

right now I can direct my users to log when a token expires but Bubble just isn’t handling this for me :frowning:

this is my setup

and all I get back are userid’s and their corresponding email’s. i can also call any endpoint i want.

the issue is that the token doesn’t always automagically refresh and I end up getting this error

The service FullCalendar's - Read Google Calendar Events  just returned an error (HTTP 401). Please contact the plugin author directly for feedback. Raw error:

      "error": {
        "code": 401,
        "message": "Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See",
        "errors": [
            "message": "Invalid Credentials",
            "domain": "global",
            "reason": "authError",
            "location": "Authorization",
            "locationType": "header"
        "status": "UNAUTHENTICATED"

the only thing I can think is that I log in too many times and run out of refresh tokens which causes the error. there is an upper limit to how many can be issued without error.

any insights here?

Have you revoked your permissions?

I am using a self-handled flow, which in itself is pretty confusing. If you follow the above steps to a t, I promise it’ll work!

1 Like

Thank you for sharing. I suppose I can update us a little bit further. It seems like I run into the most issues with authentication when I log into the same page over and over and over. I can’t seem to figure it out for now. I may switch out to a south handled flow but that doesn’t make for an easy plug in use. Anyway, thanks for the fill-in and hopefully we can get this figured out. It would just be nice if Bubble would give me access to the token that’s returned anyways instead of only handling it them self

These work for me now. I had to ditch the oauth agent flow and instead hash out refreshing and storing tokens on my own. Well worth it but it was a bit of a B

I understand. Are you reauthenticating on every page? OAuth only needs to authenticate once, and the refresh token needs to update before it expires. If you have an action where you’re authenticating every time, it’s at that point you’ll run into those issues.

Hi @mebeingken ,

Your post is amazing - thanks so much. 1 comment/change and 1 question for you.

  1. My understanding is the Contacts API is fully deprecated this week and is now People API. As a result, I had to make a couple of changes on the call for getting the contacts, specifically, the URL is,emailAddresses and requires no parameters. Not a big deal as the OAUTH was the purpose of your post but maybe worth mentioning to everyone to check latest API instructions etc.? Unless I am wrong of course which could be !

  2. In your post, you show that you actually have an API workflow (backend) to import Google contacts. Would love if you could share how it works for you or point to the right direction on this ??? I have looked for hours how to import the data coming from the Google Contacts API into my database. As you know each field comes as a coma separated list. Are you using the Import CSV functionality of Bubble to transform each list into a “contact” line or do you process the data with some smart function ? Or am I missing a simple way to do this?

Thanks again for your amazing post and wishing you a wonderful day!

Hey Jim,

It’s been a couple years since doing any Bubble work, so this post could very well be outdated, as you point out re: the People API.

As for the import, I just can’t recall what I actually did but I’m sure it was not importing a CSV. Likely just running an api and processing the results, but I just don’t remember. :slight_smile:

Good luck!


1 Like