Googlesheets4 not working

Hello,

I recently began using the googlesheets4 package in my rstudio project. It was great when I first used it. The line gs4_auth() would open a new window to select a google account and request access. This worked for me for 3 times. However, I decided to switch which google account I am working with and so I revoked access to googlesheets4 from my google account. However, I never deauthorized in my program and now I am running into a token issue. I think there is a token stored somewhere that is preventing me from using this package properly but I'm not sure. I am receiving the following error: Error: Can't get Google credentials. Are you running googlesheets4 in a non-interactive session? Consider: * gs4_deauth()to prevent the attempt to get credentials. * Callgs4_auth() directly with all necessary specifics. See gargle's "Non-interactive auth" vignette for more details: https://gargle.r-lib.org/articles/non-interactive-auth.html when I run this code gs4_auth() in my program.

Where might this token be stored and how could I resolve this issue? I tried creating a new project and that doesn't solve the issue. I also uninstalled and reinstalled the googlesheets4 package and that didn't work either.

Thanks!

. By default, these user credentials are cached in a folder below your home directory, ~/.R/gargle/gargle-oauth , from where they can be automatically refreshed, as necessary. Storage at the user level means the same token can be used across multiple projects and tokens are less likely to be synced to the cloud by accident.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

Thank you for the response!

I looked in the directory ~/.R/gargle/gargle-oauth but it is empty. I tried running the gs4_auth() with all the arguments like it is presented in the article you attached. However, I am still receiving the same error as before. Is it possible that a token or something is being stored elsewhere?

When I run gs4_user() it comes back and says Not logged in as any specific Google user.