【发布时间】:2015-01-28 21:33:38
【问题描述】:
当我按照 Hadley 的 R google Oauth2.0 演示访问 Fusion 表时,刷新令牌不可用。
演示:https://github.com/hadley/httr/blob/master/demo/oauth2-google.r
修改的“离线”尝试示例:
google_token <- oauth2.0_token(oauth_endpoints("google"), myapp,
scope = "https://www.googleapis.com/auth/fusiontables",
type= "offline",
use_oob = FALSE,
cache = TRUE)
非常感谢任何有关如何检索刷新令牌的指导。
更新: 使用以下代码返回一个字符串,其中包含 google_token$credentials。这是这里引用的授权码吗:https://developers.google.com/accounts/docs/OAuth2WebServer#offline
google_token <- oauth2.0_token(oauth_endpoints("google"), myapp,
scope = "https://www.googleapis.com/auth/fusiontables",
type= "access_type='offline'",
use_oob = FALSE,
cache = TRUE)
谢谢。
【问题讨论】:
标签: r google-api google-oauth google-fusion-tables httr