# Google OAuth Bugs

**URL:** https://community.parabola.io/t/google-oauth-bugs/2849
**Category:** Ask a question
**Tags:** Using-APIs
**Created:** [December 13, 2023, 9:16am UTC](https://community.parabola.io/t/google-oauth-bugs/2849 "2023-12-13T09:16:03Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![ANTONY\_RAPPAI](https://avatars.discourse-cdn.com/v4/letter/a/90ced4/32.png) [@ANTONY\_RAPPAI](https://community.parabola.io/u/ANTONY_RAPPAI)
#### Post date: [December 13, 2023, 9:16am UTC](https://community.parabola.io/t/google-oauth-bugs/2849/1 "2023-12-13T09:16:03Z")

</div>

Hi, i have sucessfully done a Google Oauth on multiple flows. However, recently, i noticed that i need to edit the Auth and then reauthorize it every time i want to run, making it a bit useless for automation. The minute i reauthorize, i see that it works just for that time and then stops again.

Thanks  
Anto

---

<div class="post-metadata">

### Author: ![Emory\_Stainbrook](https://sea2.discourse-cdn.com/flex020/user_avatar/community.parabola.io/emory_stainbrook/32/1772_2.png) [@Emory\_Stainbrook](https://community.parabola.io/u/Emory_Stainbrook)
#### Post date: [December 13, 2023, 5:40pm UTC](https://community.parabola.io/t/google-oauth-bugs/2849/2 "2023-12-13T17:40:38Z")

</div>

Hi @ANTONY_RAPPAI - Happy to help! By default, Google’s API tokens expire after about an hour which is likely why you’re seeing that you need to re-authenticate more frequently. One way to increase the amount of time between token expirations is to request a longer expiration time of up to 12 hours by specifying the “expires\_in” parameter when you authenticate.

You can read more about this [here](https://www.googlecloudcommunity.com/gc/Cloud-Hub/Access-token-expiration-time/m-p/529757#:~:text=Set%20a%20Longer%20Expiration%20Time,expires_in%22%20parameter%20when%20you%20authenticate).

Let me know if you have any questions!

---

<div class="post-metadata">

### Author: ![ANTONY\_RAPPAI](https://avatars.discourse-cdn.com/v4/letter/a/90ced4/32.png) [@ANTONY\_RAPPAI](https://community.parabola.io/u/ANTONY_RAPPAI)
#### Post date: [December 14, 2023, 2:50am UTC](https://community.parabola.io/t/google-oauth-bugs/2849/3 "2023-12-14T02:50:47Z")

</div>

Ok, thanks for this. I’ve never had to do this before. For example, every once in a while, i have a roster update happening to some Google Classroom classes; for those i never had to reauthenticate, this seems less than even one hour. The worst part is that Parabola does not throw any errors. It shows as if the flow ran successfully without any errors.  
I suspect there is something else as well. This same issue happened to me on another flow last week. It’s mostly to do with Google API authentication. That flow looks for new students in Airtble and tries to create new Google accounts. I thought it was running because it was successful, but the account was not created. Then I re-authenticated, and it worked.

In that link, you shared, how can we implement a refresh token?

---

<div class="post-metadata">

### Author: ![ANTONY\_RAPPAI](https://avatars.discourse-cdn.com/v4/letter/a/90ced4/32.png) [@ANTONY\_RAPPAI](https://community.parabola.io/u/ANTONY_RAPPAI)
#### Post date: [January 8, 2024, 5:32am UTC](https://community.parabola.io/t/google-oauth-bugs/2849/4 "2024-01-08T05:32:03Z")

</div>

Hi @Emory_Stainbrook , is there a way to implement this below

1. Use Refresh Tokens: When you authenticate with OAuth2, you can request a refresh token in addition to an access token. The refresh token can be used to obtain a new access token when the current one expires, which can extend the expiration time of your authentication.

---

<div class="post-metadata">

### Author: ![daniel](https://sea2.discourse-cdn.com/flex020/user_avatar/community.parabola.io/daniel/32/732_2.png) [@daniel](https://community.parabola.io/u/daniel)
#### Post date: [January 8, 2024, 7:32pm UTC](https://community.parabola.io/t/google-oauth-bugs/2849/5 "2024-01-08T19:32:44Z")

</div>

Hi @ANTONY_RAPPAI

You can implement a Refresh Token by completing the Refresh Token Request URL section when authorizing via OAuth 2.0.

Below is an example from the Google Ads API. The OAuth process is consistent throughout all of Google’s APIs:

 ![Screenshot 2024-01-03 at 12.34.41 PM](https://us1.discourse-cdn.com/flex020/uploads/parabola/original/2X/e/e2162c2faf8eb1e12ff91905535f0c5e65d69d98.png)

> Toggle the “switch to custom settings” button if your authorization modal looks different.

1. Start by adding your `client_id`, `client_secret`, and appropriate `scope`(s) for your API.

2. In the Refresh Token Request URL section, add a `grant_type` body parameter. Set its value to `refresh_token`. Once complete select “Apply custom Oauth2 settings”.

3. Finally, head back into your API step settings to ensure OAuth 2.0 is set to the correct Authentication type.

![image](https://us1.discourse-cdn.com/flex020/uploads/parabola/original/2X/a/a16230c51d7922e850cbbd86dc1c0980e738dec5.png)

Let me know if that helps!
