如何在Rogglevision中进行身份验证

时间:2017-08-02 14:24:45

标签: r google-api google-oauth google-developers-console

为了在R中使用Rooglevision,我做了

library(RoogleVision)
creds = fromJSON('client_secret.json')
options("googleAuthR.client_id" = creds$installed$client_id)
options("googleAuthR.client_secret" = creds$installed$client_secret)
options("googleAuthR.scopes.selected" = c("https://www.googleapis.com/auth/cloud-platform"))
googleAuthR::gar_auth()

然而它给了我这个错误:

400. That’s an error.

Error: redirect_uri_mismatch

The redirect URI in the request, http://localhost:1410/, does not match the ones authorized for the OAuth client. 
Please update the authorized redirect URIs.

我已将google api网络客户端的凭据窗格中的重定向URI留空,因为它表明它正在使用来自网络服务器的请求'。我要求R,所以不知道在这里填写什么。

1 个答案:

答案 0 :(得分:3)

重定向uri必须与您发送网站的位置完全匹配。基本上您希望它处理来自身份验证服务器的响应。

如果您没有使用Web服务器,那么您应该使用其他凭据类型而不是Web凭据。