Closed PhilGuerra closed 2 years ago
This could be intermittent back luck or there could be something going on, e.g. with curl config or a proxy or ???, since you report a very different experience in the two settings.
But I can't help but point out this auth code seems rather confused.
Are you planning to auth with an API key or a user token? First the API key gets set ... but then immediately a user email is configured.
Why set the gargle_oauth_email
option to an actual email but then immediately overwrite that with TRUE
?
Hi Jennifer,
Sincerely, Phillip
On Thu, Jan 20, 2022 at 10:14 AM Jennifer (Jenny) Bryan < @.***> wrote:
This could be intermittent back luck or there could be something going on, e.g. with curl config or a proxy or ???, since you report a very different experience in the two settings.
But I can't help but point out this auth code seems rather confused.
Are you planning to auth with an API or a user token? First the API key gets set ... but then immediately a user email is configured.
Why set the gargle_oauth_email option to an actual email but then immediately overwrite that with TRUE?
— Reply to this email directly, view it on GitHub https://github.com/tidyverse/googlesheets4/issues/250#issuecomment-1017670490, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJOFDOXZGEYATYW6TACKJM3UXAYFHANCNFSM5MKZLNZQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you authored the thread.Message ID: @.***>
Various approaches for non-interactive auth are described here:
https://gargle.r-lib.org/articles/non-interactive-auth.html
Assuming you've got a valid, properly scoped googledrive token cached, from some successful interactive use, the auth code in the above example should get trimmed down to just this:
library(googledrive)
options(gargle_oauth_email = TRUE)
If you regularly work with googledrive AND multiple google identities, then you would want to specify the exact identity to use:
library(googledrive)
options(gargle_oauth_email = "myname@myemail.com")
Hi love Googlesheets4!
Recently however I have been receiving a timeout error when attempting to read_sheet whereas previously my code had been working for several months flawlessly since I was forced to upgrade from Googlesheets to Googlesheets4 (v.1.0.0):
"Error in curl::curl_fetch_memory(url, handle = handle) : Timeout was reached: [sheets.googleapis.com] Connection timed out after 10001 milliseconds"
I am accessing via: library(googledrive) drive_auth_configure(api_key = "5XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXT") drive_api_key() options(gargle_oauth_email = "myname@myemail.com") options(gargle_oauth_email = TRUE)
...after which read_sheet results in the error above.
_Strangely readsheets works when automated with Cron. It is when I use RStudio and run code manually when I get the timeout error.
Any ideas? Do I need to refresh OAuth or tokens etc? All that stuff confuses me, and I was hoping to do it only one time in my life...
Thank you.