-
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
Getting started #1
Comments
Hi there @lcolladotor, apologies for the incomplete answer. I believe part of your issue is when you select the kind of authorization you want from Google. You have to select "installed applications", then Google will give you a json to download. Before you make your query, though, make sure you authorize the 'Consent screen' under APIs & auth. Without that you'll run into an 401 error. I hope it helps ... |
Hi, Thank you for the input @luiscape, I got farther this time. So, under "APIs & Auth", sub-menu "Credentials" I created a new client ID of the "installed applications" type (selecting "other"). Downloaded the new json file and... then got another error. Steps followedI made sure to clear the directory before proceeding as shown below. $ rm .Rapp.history
$ rm .httr-oauth
$ rm .gitignore
$ R Everything seemed to go fine, as I did get to authorize the app and got the message on the browser saying it was fine. > library(gmailr)
> gmail_auth("new-installed-applications.json")
Use a local file to cache OAuth access credentials between R sessions?
1: Yes
2: No
Selection: 2
Waiting for authentication in browser...
Press Esc/Ctrl + C to abort But within 1 second of authorizing the app in the browser, an error popped up in the R console. Authentication complete.
Error in gmail_auth("new-installed-applications.json") :
cannot change value of locked binding for 'google_token'
> traceback()
1: gmail_auth("new-installed-applications.json") Got any tips on what to do now? Seems like it could be related to Binding and Environment Locking. Session info> sessionInfo()
R version 3.1.1 (2014-07-10)
Platform: x86_64-apple-darwin10.8.0 (64-bit)
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] gmailr_0.0.1 colorout_1.0-2
loaded via a namespace (and not attached):
[1] base64enc_0.1-2 httpuv_1.3.0 httr_0.4 jsonlite_0.9.10
[5] Rcpp_0.11.2 RCurl_1.95-4.3 stringr_0.6.2 |
I can reproduce this, the problem and fix is detailed at http://adv-r.had.co.nz/Environments.html#explicit-envs The reason that I did not notice this issue when I was developing the package is I was using devtools |
Hello,
I am probably missing something obvious, but I am having trouble getting started with using
gmailr
.So, hm... what am I missing?
I did check that under the "Permissions" menu all the service accounts have the permission to edit. The Gmail API auth page didn't help me either.
Thanks!
The text was updated successfully, but these errors were encountered: