-
Notifications
You must be signed in to change notification settings - Fork 8
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
Getting author information from orcid API #639
Comments
I don't see any reason to NOT do this. |
Just pulling the public-record.json (e.g. https://orcid.org/xxxx-xxxx-xxxx-xxxx/public-record.json) file of a user does not work client side cause of CORS. |
I've played with the API before, I think I can figure out how to do this. |
From the orcid API documentation, you need to generate a Client ID and secret, which you can use to generate a token:
That yields a token, which is valid for 20 years or so (maybe we can do this only once even offline) To get record information you can then use that token to call the
Result looks something like this:
|
I think the challenge that we discussed (@fdiblen and @recap, please clarify it this is not correct) is that we don't have a backend and therefore we can't store our TOKEN safely. What if we ask the user for a TOKEN, and don't store it? |
Yes, we will need to think about how to do this. Maybe having a backend will help but it will be out of scope until we fix high priority issues. |
Actually, I played with the API a bit more, and it turns out you can use the |
Here a PR with a first attempt -- much work needed before it is anything sensible, but it is a start. |
@c-martinez Did you have success with the public api https://pub.orcid.org/v3.0/expanded-search/?q=orcid:.... Seems it is also blocked by CORS? |
never mind. seems to work! |
The POC by @c-martinez is here: main...c-martinez:cff-initializer-javascript:orcid-api |
Part of the public object returned is an array of institution-name which is the union of education and employment so the first in the array is not necessarily the current person's affiliation. Emails array seems to be always empty. So it seems the only useful info we get is name and family name. Is it worth it to do an external api call for just name and surname? |
At the moment, given name and last name and orcid are manually entered. It would save the user some typing if, when an orcid is provided, it could auto-complete given name and last name. This information could be pulled from orcid using their public API (maybe email and affiliation can also be retrieved).
Is there any reason NOT to do this?
The text was updated successfully, but these errors were encountered: