-
Notifications
You must be signed in to change notification settings - Fork 25
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
Consider supporting Rstudio server #23
Comments
The following env vars (
|
I was actually looking forward on using box-r on rstudio server. |
In the meantime, you could try setting up your account on a local machine, and then copying over the generated token file ( |
Thanks for the tip. I registered on a windows laptop i had around and got the .box-auth. First of all, it didnt work just copying the .box-oauth. Besides de .boxr-oauth i needed to copy ~/.Renviron as well (was a file with only two lines that contained my box id and box secret). library(boxr)
Can you point me out to the page where you saw this workaround? perhaps i could read a bit from them to see if i needed to do something else. Thanks! |
Well, what do you know.
library(boxr)
wonder if i will able to refresh from rstudio now. Thanks for the pointers! w/o your guidance i would be stuck! Keep the good work and i hope you can sort this hurdle in the near future! |
Very glad it worked! 😄 Based on my (wobbly) understanding of OAuth2.0, if auth'ing via two machines does give you problems, setting up separate 'Apps' at box.com (and using separate tokens) is likely to stop this happening. This is more of an issue with API design than the R package I'm afraid. |
Hi Brendan, do you have any progress on this? I am trying to use it without needing to open the browser and click "yes" to authorize. |
I'm afraid having to do the browser part somewhere is the essence of OAuth2.0; there's no way around it with the box.com API. The token-copying method described above, while annoyingly manual, seems to be the recommended behaviour for similar packages, such as rdrop2. It seems that the googlesheets team made some progress towards making the token-copying part unnecessary, but it doesn't look like it's quite a solved problem yet (though I may be mistaken). I have a suspicion that you'd need to get into the internals of I'm afraid I'll be unable to spend significant time on this in the near term, but if it's a pressing need for you and you'd like to have a crack at it, I'd be happy to consider a pull request. |
Got it. Thanks. Great job on this package. :-) |
Copy and paste method described here (h/t @nwstephens): |
At the moment, the auth process gets as far as launching a new browser window and the 'grant access' button. However, R can't read the results.
The tab stayed open with a URL like this: http://localhost:1410/?state=2WnJOcTuKG&code=cYWy4jBcMc0cHDkw3DjJcEuUVh1MiX1w
It may well be that this contains enough information for a user to copy and paste it back in to the console, and for a
httr
token object to be constructed.The text was updated successfully, but these errors were encountered: