2

I experience some problems. I use a R-Script on one machine successfully. The same script used on a different computer causes problems:

# Here I register the sheet 

browser <- gs_title("Funnel Daily")

browser<-gs_edit_cells(ws="Classic Browser", browser, input = ClassicBrowser, anchor = "A1",byrow = FALSE, col_names = NULL, trim = F,verbose = TRUE)

Auto-refreshing stale OAuth token.
Error in gs_lookup(., "sheet_title", verbose) : 
 "Funnel Daily" doesn't match sheet_title of any sheet returned by gs_ls() (which        should reflect user's Google Sheets home screen).
   > browser <- gs_title("Funnel Daily")
Error in gs_lookup(., "sheet_title", verbose) : 
  "Funnel Daily" doesn't match sheet_title of any sheet returned by gs_ls() (which   should reflect user's Google Sheets home screen).`

if using gl_ls() I get a message about an google account which I also frequently use. So is there a way maybe via a token or so to differentiate between accounts or how can I solve that issue. I mean how can I force googlesheets to access some specific account? Currently I'm using the tokenof the account which corresponds to Funnel Daily. The only possibility I can think of which may have caused the issue is that the browser-authentification was done with the account which not included Funnel Daily..I just confused them. I tried to remove googlesheets as well as httrwith all dependencies. But when running the library(googlesheets) and asking gs_user googlesheets always refers to the account which doesnt include the specific sheet.

Rentrop
  • 20,979
  • 10
  • 72
  • 100
Googme
  • 914
  • 7
  • 27
  • `gs_auth` returns a "token". each token can be saved to an R data file and then passed _to_ calls to `gs_auth` to change the the internally saved token for the current session. you probably cached credentials after some use of `googlesheets` and the cache file should be `.httr-oauth` in your home directory. – hrbrmstr Sep 30 '15 at 10:35

1 Answers1

1

Include your credentials and confirm the browser authentication via your Funnel Daily Google Account:

 options(googlesheets.client_id = "",
    googlesheets.client_secret = "",
    googlesheets.httr_oauth_cache = FALSE)

gs_auth(token = NULL, new_user = FALSE,
    key = getOption("googlesheets.client_id"),
    secret = getOption("googlesheets.client_secret"),
    cache = getOption("googlesheets.httr_oauth_cache"), verbose = TRUE)

Cheers

Mamba
  • 1,183
  • 2
  • 13
  • 33