我在 AWS“Ubuntu Server 12.04.2”上运行 R Studio,并通过我的浏览器访问 R Studio。
当我尝试使用带有代码的 googlesheets 包对 google auth API 进行身份验证时:
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)
这里的问题是它会将我重定向到本地机器(基于 Windows)的浏览器。即使我授权它,它也会重定向到像“ http://localhost:1410/?state=blahblah&code=blahblah ”这样的 URL。
在这种情况下如何授权 googlesheets?
我什至尝试从我的 Windows 机器转移现有的 httr-oauth 令牌以删除 ubuntu 服务器。