-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update instructions re: how to get one's own app #143
Comments
I'd like to read these explanations as I suspect it'd solve #152 (or make me give up, if one needs to verify the app). 😁 |
I just went through this process today to get |
This is what worked for me today. It's an updated version of https://www.infoworld.com/article/3398701/how-to-send-email-from-r-and-gmail.html by Sharon Machlis. (Thank you Sharon!) Happy to ask students to test and write up more formally somewhere if that's helpful.
Continue with Setup instructions in the README.md starting with “Tell gmailr |
This approach seems not working now. Here is what I got (Client app was set as "Desktop App") Code
Output
The process halt. My session
|
@ThoDuyNguyen you may also need to specify test users (your own email), and scope (GMail) in OAuth consent screen. |
Not for GMail but trackdown has a nice article on setting up an app (for GMail one would "just" use other APIs/scopes) https://claudiozandonella.github.io/trackdown/articles/oauth-app-configuration.html |
Out-of-band auth has been partially shut down and that appears to play a role in what some people are seeing here (there is now a lot of different stuff reported in this thread). The latest gargle release has more details: https://gargle.r-lib.org/news/index.html#gargle-130 To remind everyone, gmailr can't use the built-in tidyverse app, because we can't get those scopes approved. So gmailr users often have to bring their own app and this has gotten noticeably more complicated for those who need out of band auth (OOB), i.e. where R/RStudio is running in the browser (vs. local computer). This is handled by what we now call pseudo-OOB. This requires a client of "web application" type. These are the basic instruction for getting one's own app: https://gargle.r-lib.org/articles/get-api-credentials.html#oauth-client-id-and-secret If one is using a web application client and the pseudo-OOB flow, you'll also need to redirect to a static page that aids with token exchange. This is discussed in the later part of this thread: The short version is that, at least for early experimentation, people can probably use the tidyverse page for exchange. Otherwise, you can serve your own somewhere, using example HTML provided in the gargle package. If anyone pursues this, I'd love to hear from you, so we can form a more official stance on the callback page and improve the documentation. |
I used gmailr today for the time in a long time (definitely since the switch to gargle).
Overall, it was really smooth! I used the env var approach to convey the path to the JSON holding client ID and secret.
The process of getting one's own oauth app isn't reflected very well by the current README. I was able to do it because I have a lot of background knowledge, but it would be nice to update this. I might do this myself or perhaps someone else will do so.
The text was updated successfully, but these errors were encountered: