使用bigQueryR进行OAUTH身份验证会导致Unauthorized(HTTP 401)错误

问题描述 投票:1回答:1

我尝试使用bigQueryR进行OAUTH身份验证(我有理由不使用服务密钥身份验证)。

正如documentation建议我做了以下并收到错误:

> library(bigQueryR)
> bqr_auth()

Waiting for authentication in browser...
Press Esc/Ctrl + C to abort
Authentication complete.
Error in oauth2.0_access_token(endpoint, app, code = code, user_params = user_params,  : 
Unauthorized (HTTP 401). Failed to get an access token.
In addition: Warning message:
In googleAuthR::gar_auto_auth(required_scopes, new_user = new_user,  :
travis_environment_var argument is now unsupported and does nothing

在这个项目中,我已经使用bigRQuery成功使用了OAUTH(注意,而不是bigQueryR),因此我的工作目录中已经有了一个.httr-oauth文件。

我还尝试删除此文件,然后再次进行身份验证。同样的错误。我也尝试了bqr_auth(new_user = TRUE)没有成功。使用googleAuthR::gar_auth(new_user = TRUE)我也会得到同样的错误。

我想知道如何解决这个问题。

r authentication oauth google-bigquery
1个回答
2
投票

在发布问题后很快就找到了答案。这是由于bigQueryRhttps://github.com/cloudyr/bigQueryR/issues/45中的一个错误

程序包的创建者建议使用服务密钥身份验证方法,直到修复程序到位。

编辑 - 包的创建者关闭了这个问题。希望现在解决。

© www.soinside.com 2019 - 2024. All rights reserved.