Closed estebangatillo closed 10 months ago
What is the publishing status of your OAuth client? If it's "Testing", refresh tokens will become invalid (unrefreshable) every 7 days.
https://gmailr.r-lib.org/articles/oauth-client.html#use-a-non-verified-in-production-app
OMG, I thought I was barking up the wrong tree when it told me to verify with a youtube video. Seriously? Then I read this and I LOVE how you wrote it!
"Presumably you have no intention of doing any of these things, since this OAuth client is for personal use. Regardless, click “CONFIRM” to proceed.
Now the OAuth consent screen settings reflect the new publishing status, which is “In production”. However, you will also see that your project “Needs verification”. You will just have to accept this situation as something awkward that comes when an individual R user is forced to use API configuration that is really designed for application developers."
Thank you much for the link! I'll work through this.
I have successfully used gmailr to download attachments from gmail (thank you!). Getting the authentication up was troublesome, but it's working. However, non-interactively my token keeps expiring, I have to keep generating new auth keys interactively, and it's a hassle. I double checked the app and there doesn't appear to be any limitations, so I can't tell why I'm getting an expiration message.
Here is the error:
Based on the issues I've read about, I've added this to my script:
options(gargle_oauth_email = "my.email@gmail.com")
And I think this is where the non-interactive issue is occurring:
gm_auth_configure(path = path, email = "capa.uploader@gmail.com", scopes = "full")
I've also fiddled with using just this with no results:
gm_auth(email = "my.email@gmail.com", scopes = "full")
Here is my session info: