Google Sheets API Connection throwing an error , already authorized on Google

Hello,

I am using the ready API connector built-in Drona (Find Rows) method. I have authneticated DronaHQ multiple times to allow access to my Google stuff. But the connection isn’t working. (It was working for a couple of hours yesterday)

Because it’s a ready connector, it seems like I can;t check the auth token on my side. I can only see 3rd parties that can access my account and DronaHQ is one of them

Screen Shot 2021-03-26 at 2.06.43 PM

@cdizon1

I believe you are on Google’s Gsuite Business account and in that under security settings with Admin account, can you check if there is OAuth Refresh Token policy set? you can update that policy in order to have this connector working for longer duration.

Do have. a look at below documentation if it is relevant -
https://cloud.google.com/apigee/docs/api-platform/antipatterns/oauth-long-expiration

I will quickly explain how this Google connector (Or any OAuth based connector) works Under the hood -

  1. When you connect your oauth account, you get a consent screen where you accept the request and grant permission
  2. Google in turn provides an access token and refresh token to Us. Access token has shorter duration - typically 30 mins / 60 mins where as refresh token is of larger duration
  3. Once we get this 2 tokens, we are able to consume Google resources using access token.
  4. Once the access token expires, we attempt to re-generate access token from google using refresh token. If refresh token is valid, google re-issues access token and refresh token. Now, this access token can be used to consume google resources. However, if refresh token itself gets expired, there is no way to regenerate access token without end user explicitly accept that consent form again,

This is exactly what seems to be happening with your case, so will request you if you can check the admin policies for refresh token duration to be of longer timeframe so that you can use it smoothly.

Also, We do have a Google Sheet connected account which is working fine for more than 2 months now.
Additionally, for re-authenticating, you can simply click on the refresh icon and grant permission without making any change in your app and it will start working.


Hope this Helps!

@fenil.jain , I talked to the Gsuite Admins (IT at my company) and confirmed there’s no OAuth Refresh Token policy set. I sent them what you had mentioned above as a potential solution

From IT:

The vendor you work with seemed pretty educated on the subject so if they could give an accurate description of where this change should be made it would be very helpful. I did follow what you put in the ticket but it confirmed it doesnt appear we have any policies attach to API Time of Life

I also tried revoking DHQ studio access to my GSuite and reauthenticate, I tried the reauthenticating method you gave above and it still is not working

I thought reauthenticating will fix the issue but it seems it’s not connecting, drona used to be able to ull up the sheet names in my drive so I can select from the dropsdowns but it is not even showing those gsheet names.


Screen Shot 2021-03-31 at 9.23.25 AM

I also tried with a different account (not business account) and reauthenticate multiple times, and it still does not work, I think there might be something funky going on with the ready connectors

Its working seamlessly for me, and i have connected the account around 3 months back and i have not had a need to reconnect again. The only difference I see is the token expiry time or some other policy setting in your gsuite account.

This might need a conversation with your google account manager incase this persists.

This issue has been resolved with the help of Chirag, Fenil, and Rahul from your team.

Solution: make sure the account I am using has access to the app catalog that the app is assigned to.

I hope it does not break after a couple of days, and if does, it definitely is a refresh token problem that our IT can take up to Google

1 Like

@fenil.jain or @chirag1 , one last thing, the API connection seems to work well on preview mode . I published the app and opened it on web/ipad/ and iphone, using the same account I used in the Drona studio but the Gsheets APi does not seem to be working, do you have an idea why that is? anything I should take a look at?

there is no error message showing on the published environment, it just does not load, but it works well on the preview mode (unpublished)

I created a separate issue for the follow-up question