我尝试使用RGA包(https://github.com/artemklevtsov/RGA)从Google Analytics core API获取数据。
authorize(
client.id=options()$apiSecrets$id,
client.secret=options()$apiSecrets$clientSecret,
cache=paste(getwd(),"daToken",sep="/")
)
因此,缓存被设置为类似于/User/foo/bar/daToken
的值。我可以看到文件,一切正常,我现在可以访问数据。然而,30-60分钟后,令牌似乎就过期了。现在,在进行新的尝试时,将出现错误消息Error : client error: (401) Unauthorized Auth error: Invalid Credentials
为什么令牌不再起作用?如何设置更长的生存时间?另外:为什么会有错误,为什么RGA不尝试获取新的令牌?
发布于 2015-12-31 13:42:41
https://stackoverflow.com/questions/34513115
复制相似问题