{"action":"created","issue":{"url":"https://api.github.com/repos/jennybc/gspreadr/issues/79","labels_url":"https://api.github.com/repos/jennybc/gspreadr/issues/79/labels{/name}","comments_url":"https://api.github.com/repos/jennybc/gspreadr/issues/79/comments","events_url":"https://api.github.com/repos/jennybc/gspreadr/issues/79/events","html_url":"https://github.com/jennybc/gspreadr/issues/79","id":64716042,"number":79,"title":"My gsheet is 'published to the web' but I still get 'Error: oauth_listener() needs an interactive environment' when knitting","user":{"login":"benmarwick","id":1262179,"avatar_url":"https://avatars.githubusercontent.com/u/1262179?v=3","gravatar_id":"","url":"https://api.github.com/users/benmarwick","html_url":"https://github.com/benmarwick","followers_url":"https://api.github.com/users/benmarwick/followers","following_url":"https://api.github.com/users/benmarwick/following{/other_user}","gists_url":"https://api.github.com/users/benmarwick/gists{/gist_id}","starred_url":"https://api.github.com/users/benmarwick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benmarwick/subscriptions","organizations_url":"https://api.github.com/users/benmarwick/orgs","repos_url":"https://api.github.com/users/benmarwick/repos","events_url":"https://api.github.com/users/benmarwick/events{/privacy}","received_events_url":"https://api.github.com/users/benmarwick/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-03-27T07:57:50Z","updated_at":"2015-03-29T18:17:50Z","closed_at":null,"body":"How can I avoid having to authorise when accessing my [google sheet](https://docs.google.com/a/uw.edu/spreadsheets/d/1vFtO8i3zH8pk4RoxkcQw5kFtCDeooYVimUaXGD8n1WY/)?  My sheet is both 'published to the web' and 'public on the web'. \r\n\r\nHere's my R markdown:\r\n\r\n```{r}\r\nlibrary(gspreadr)\r\nlibrary(dplyr)\r\n\r\n# register sheet\r\nmy_gsheet_key <-  \"1vFtO8i3zH8pk4RoxkcQw5kFtCDeooYVimUaXGD8n1WY\"\r\nmy_gsheet <- register_ss(my_gsheet_key, visibility = \"public\") \r\n# also tried it without the visibility argument, no difference\r\n\r\n# get data\r\nLOI <- my_gsheet %>% get_via_csv(ws = 5)\r\nall_data <- my_gsheet %>% get_via_csv(ws = 1)\r\n```\r\n\r\nThis works fine interactively (and is super fast!). But when I knit with R-3.1.2, I get:\r\n\r\n```\r\nQuitting from lines 2-11 (Preview-1f42c47301a.Rmd) \r\nError: oauth_listener() needs an interactive environment.\r\n\r\nExecution halted\r\n```\r\n\r\nand with R-3.2.0 the error message is slightly different: \r\n\r\n```\r\nQuitting from lines 2-12 (test.Rmd) \r\nError: interactive() is not TRUE\r\n\r\nExecution halted\r\n```\r\n\r\nWhat am I missing?\r\n\r\n\r\n```\r\n> sessionInfo()\r\nR version 3.1.2 (2014-10-31)\r\nPlatform: x86_64-w64-mingw32/x64 (64-bit)\r\n\r\nlocale:\r\n[1] LC_COLLATE=English_United States.1252 \r\n[2] LC_CTYPE=English_United States.1252   \r\n[3] LC_MONETARY=English_United States.1252\r\n[4] LC_NUMERIC=C                          \r\n[5] LC_TIME=English_United States.1252    \r\n\r\nattached base packages:\r\n[1] stats     graphics  grDevices utils     datasets  methods  \r\n[7] base     \r\n\r\nother attached packages:\r\n[1] dplyr_0.4.1    gspreadr_0.1.1\r\n\r\nloaded via a namespace (and not attached):\r\n [1] assertthat_0.1  bitops_1.0-6    DBI_0.3.1       devtools_1.7.0 \r\n [5] digest_0.6.8    evaluate_0.5.5  formatR_1.0     htmltools_0.2.6\r\n [9] httpuv_1.3.2    httr_0.6.1.9000 jsonlite_0.9.14 knitr_1.9      \r\n[13] lazyeval_0.1.10 magrittr_1.5    parallel_3.1.2  plyr_1.8.1     \r\n[17] R6_2.0.1        Rcpp_0.11.4     RCurl_1.95-4.5  rmarkdown_0.5.1\r\n[21] stringr_0.6.2   tools_3.1.2     XML_3.98-1.1    yaml_2.1.13 \r\n```\r\n\r\n```\r\n> sessionInfo()\r\nR version 3.2.0 alpha (2015-03-25 r68091)\r\nPlatform: x86_64-w64-mingw32/x64 (64-bit)\r\nRunning under: Windows 7 x64 (build 7601) Service Pack 1\r\n\r\nlocale:\r\n[1] LC_COLLATE=English_United States.1252 \r\n[2] LC_CTYPE=English_United States.1252   \r\n[3] LC_MONETARY=English_United States.1252\r\n[4] LC_NUMERIC=C                          \r\n[5] LC_TIME=English_United States.1252    \r\n\r\nattached base packages:\r\n[1] stats     graphics  grDevices utils     datasets  methods  \r\n[7] base     \r\n\r\nother attached packages:\r\n[1] dplyr_0.4.1    gspreadr_0.1.1\r\n\r\nloaded via a namespace (and not attached):\r\n [1] Rcpp_0.11.5       XML_3.98-1.1      digest_0.6.8     \r\n [4] assertthat_0.1    bitops_1.0-6      R6_2.0.1         \r\n [7] plyr_1.8.1        DBI_0.3.1         magrittr_1.5     \r\n[10] httr_0.6.1        lazyeval_0.1.10   rmarkdown_0.5.3.1\r\n[13] devtools_1.7.0    tools_3.2.0       stringr_0.6.2    \r\n[16] RCurl_1.95-4.5    parallel_3.2.0    htmltools_0.2.6  \r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/jennybc/gspreadr/issues/comments/87452562","html_url":"https://github.com/jennybc/gspreadr/issues/79#issuecomment-87452562","issue_url":"https://api.github.com/repos/jennybc/gspreadr/issues/79","id":87452562,"user":{"login":"jennybc","id":599454,"avatar_url":"https://avatars.githubusercontent.com/u/599454?v=3","gravatar_id":"","url":"https://api.github.com/users/jennybc","html_url":"https://github.com/jennybc","followers_url":"https://api.github.com/users/jennybc/followers","following_url":"https://api.github.com/users/jennybc/following{/other_user}","gists_url":"https://api.github.com/users/jennybc/gists{/gist_id}","starred_url":"https://api.github.com/users/jennybc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jennybc/subscriptions","organizations_url":"https://api.github.com/users/jennybc/orgs","repos_url":"https://api.github.com/users/jennybc/repos","events_url":"https://api.github.com/users/jennybc/events{/privacy}","received_events_url":"https://api.github.com/users/jennybc/received_events","type":"User","site_admin":false},"created_at":"2015-03-29T18:17:50Z","updated_at":"2015-03-29T18:17:50Z","body":"Will you install from this branch and see if works? Seems to for me now.\r\n\r\n```r\r\ndevtools::install_github(\"jennybc/gspreadr\", ref = \"no-need-token-public-visibility\")\r\n```"}}