How to Get a Google Oauth 2.0 Refresh Token - Bubble.io Tutorial

preview_player
Показать описание

Learn how to generate a refresh token for your Google OAuth 2.0 API authorization in Bubble!

===========================
Limited Time One-on-One Consulting -
===========================

✅ Subscribe to be notified when the more Bubble tutorial videos come out.

➡️ Disclaimer - this page contains an affiliate link that gives a credit valid towards our monthly Bubble account fee but has no cash value beyond this. Should you decide a paid Bubble account is right for you, thank you in advance for your support.
Рекомендации по теме
Комментарии
Автор

If you do not see a refresh token in the API response when you exchange the code for an access token/refresh token, try adding &access_type=offline to the end of your auth URL when you send users off to authorize.

NoCodeAcademy
Автор

It is not clear where you got the "Google API Exchange Code..." at Step 2 in the workflow. Is this a custom event you created? Where did it come from? 3:57, this whole step became confusing as you jumped around a bit. Can you clarify, please?

silverqueentarot
Автор

isnt this what OAuth 2 user agent flow is for in the bubble API connector?

ThibaldLeonhard
Автор

Thanks for the video! I'm finding that in my app the token only refreshes once and then it needs to be manually reinitialized again. I feel like this is because a new refresh token isn't set in the last step of the workflow?

E.g. at 16:25, it shows an example workflow:
Step 1: Google API - Exchange Refresh Token for Access Token Call
Step 2: ...
Step 3: ...
Step 4: Make changes to current user

In that last step, only the access token and expiration are updated, but the refresh token isn't and you can't get a new refresh token from the result of step 1

Do you know what I might be missing?

clarksaxby
Автор

Great video !
I don't have the refresh token at step "Make change to current user". Do you know what could be the reason ? It seems the API answer does not return it.
Thanks in advance for your help !
Romain

novatix-ai
Автор

Great video! I have watched your video on oauth 2.0 and YouTube API and both are working well for my website.

However I have a question. On my website I want to show list of YouTube video thumbnail to the website's visitor that I have stored in my public YouTube playlist.
But the visitor will not able to see this thumbnails because I have to authenticate using my account for the API to be able to fetch my public playlist.

How can I show my public playlist without having to authenticate everytime a user visit my website?

Thanks in advance :D

CalmThumbnail
Автор

For some reason that I don't understand, suddenly when I use an API call to get the access token it gives me the following error:
{
"error": "invalid_grant",
"error_description": "Bad Request"
}

Previously, it has been working for me without any problems and I have checked and changed the client_id and secret_id three times to see if this was not what was wrong.
I have not modified anything or created anything new.
I'm stuck and I don't understand what the problem is, so I'm posting it here to see if anyone has had this happen to them too.

iki_ramos
Автор

Hello, thank you for your video!!! It's very good!! But I'm having an issue, I'm fetching some data and the API I'm using requires an access token that needs to be refreshed every hour. I need to display that information later in my app, but I'm not able to achieve it, can you tell me how to work with the incoming data?

AlaGrandeLePuseCuca
Автор

does the User-Agent Flow Authorization handle this for us? Also, is it safe to store Access Tokens on our database?

CreateBetterOnGreensleeve
Автор

Great toturial! Thanks!
I was trying to initialize the call, in the Google Sheet one, but keep getting errors.
I cam pasting the token recieved in the url, from the first call - The get access token one.
Maybe it has something to do with the user which is actually auth to google sheet? I am just open this page uri in a preview.

AmirTaiar-pm
Автор

You can eliminate the redundancy in this workflow by moving the Refresh Token and Update User Data steps up front.

Step 1: Refresh the token if it's expired
Step 2: Update User details if Step 1 returned anything.
Step 3: Call the API with confidence.

The duplicate API call step is eliminated, because we guarantee a valid token up-front.

AnthonyCastrio
Автор

Great tutorial! Except That I am using Azure TTS API. I understand the overall concept but can't get the token to refresh via workflows. 😒

YNTube
join shbcf.ru