-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unauthorized (HTTP 401). Failed to get an access token. #45
Comments
Could you report your sessionInfo() ? I suspect it’s you need to update to googleAuthR 0.6.2. If that’s installed please try reauthenticate with a fresh session. |
googleAutR is 0.6.2. Also tried older version. Prompt error "require googleAuthR version >= 0.6.2" sessioninfo() Matrix products: default locale: attached base packages: other attached packages: loaded via a namespace (and not attached): Also tried and delete the .httr-oauth file and create a new separate file. Both didn't work either. |
May I ask for the code you are using to authenticate? Are you using your own client ID/secret? |
Ok I could replicate it. Short term I suggest you authenticate via the service JSON method, which involves downloading the auth.json and then placing it in the environment argument Long term I will fix this, which is caused by the scopes changing during authentication when using the |
I think this is due to my default bigQueryR project becoming unverified e.g. it works if you set your own client ID and secret via |
i was using bqr_auth() to authenticate |
Had the same issue and posted it on stackOverflow. Only after that did I find this thread. Posted an answer with a link pointing here. You might want to post there too if a fix is in place. |
Thank you for suggesting JSON method. It worked. I want to upload a dataset of around 1 Million rows and 39 columns to big query daily(without using google cloud. Or cloud is the only option?). |
Cool, I think the answer here for now is to configure using your own Google Cloud project, since the bigQueryR doesn't work at the moment. I'll answer your follow up question in another issue to keep this one clean. |
@analytics-ml see #47 |
Related? r-dbi/bigrquery#182 |
@analytics-ml @peteratemarsys the original bigQueryR Google project has been verified now, so I think it should work again as before using the CRAN version? Can anyone confirm? In any case, the GitHub version works for me using the bigQueryR Google project. |
@MarkEdmondson1234 It still doesn't work with the CRAN version. I uninstalled and then re-installed the package to make sure and got the same error message. I then tried too with the GitHub version and that works just fine. |
Hi @MarkEdmondson1234 ! Do you plan to pick this up again? I tried it using the CRAN version again and can confirm that using email authentication doesn't work. I'm asking because in our project we would sometimes need to use service key authentication (e.g. running services on a server) but sometimes it'd be more convenient to use the email authentication for personal analysis. |
Hi @peteratemarsys are you saying it works with the GitHub version? In that case I will just make sure to publish that to CRAN ASAP |
Hi @MarkEdmondson1234! Yes, it works with the GitHub version. Many thanks |
I encounter the following error while authentication with Google. (bqr_auth() )
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
it was working perfectly before updating the package to version 0.3.2.
Other libraries like bigrquery authenticate perfectly but not bigQueryR.
Where is the problem any suggestions?
The text was updated successfully, but these errors were encountered: