Closed pkraker closed 6 years ago
Sorry about the error. We've added docs on authentication here https://github.com/ropensci/rorcid/blob/master/R/auth.R#L11-L37
Can you run R interactively, and run orcid_auth()
, then get the token out of that? Or does running `orcid_auth()
not work when in R interactive session?
Thanks, running orcid_auth()
did indeed do the trick! But I had to switch to a system that allows for an interactive session to obtain the token. In the terminal-only environment, orcid_auth()
produced the following error:
> orcid_auth()
no ORCID token found; attempting OAuth authentication
Waiting for authentication in browser...
Press Esc/Ctrl + C to abort
/usr/bin/xdg-open: line 461: links2: command not found
/usr/bin/xdg-open: line 461: links: command not found
/usr/bin/xdg-open: line 461: lynx: command not found
/usr/bin/xdg-open: line 461: w3m: command not found
xdg-open: no method available for opening 'https://orcid.org/oauth/authorize?client_id=[...]
thanks for this, yeah we need to fail nicely when the user is in a context where a browser can no be opened
so i guess there's no way to open a browser in shell only env, so it can't work in that case. my smarter colleague tells me there's not really a way around this. So I guess we can at least document the pitfall
OS: Ubuntu 14.04 R version: 3.4.0 Pacakge version: 0.4.2.9110
I am trying to run a script using
rorcid
withRscript
. I completed the following steps, but I always get the following error:Error: Unauthorized (HTTP 401)
http://localhost
ORCID_TOKEN
Where did I go wrong?