import urllib.request
with urllib.request.urlopen("https://orcid.org/oauth/authorize?client_id=APP-90R3NMFJNN5M4J84&response_type=code&scope=/authenticate&redirect_uri=http://ebloc.org") as url:
s = url.read()
print(s)
Please note that I do not want to use any GUI for this approach.
--
You received this message because you are subscribed to the Google Groups "ORCID API Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to orcid-api-users+unsubscribe@googlegroups.com.
To post to this group, send email to orcid-api-users@googlegroups.com.
Visit this group at https://groups.google.com/group/orcid-api-users.
For more options, visit https://groups.google.com/d/optout.
I just want to obtain ?code=svrdQ7 section from console, not using GUI, basically.
--
$ curl -H 'Accept: application/json https://pub.orcid.org/v2.0/0000-0001-6901-4767'
curl: no URL specified!
curl: try 'curl --help' or 'curl --manual' for more information
The ‘authorization server’ in OAuth needs to interact with the user - which is commonly done through a GUI…….these resources sound like they are about a similar scenario to what you describe – sharing in case they help – note mainly about Google as the authorization server, so not all methods are necessarily supported by ORCID authentication and authorization server.
Getting ORCID IDs that are authenticated is good practice – as you say it gives more confidence in the correctness of the ID (as indeed is recommended by ORCID) – what you are asking is for the ORCID authentication server to interact with the user by command line OR (if it is acceptable for you) that the user run a command that you give them to paste in the browser and copy the token to you, then the links may have some suggestions, but it sounds messy from a user interaction point of view (as one of the issues).
http://www.benmccann.com/oauth-in-a-command-line-script/
https://martinfowler.com/articles/command-line-google.html
(Note I’ve not tried these myself, just had a look around for my own curiosity).
Monica
--
You received this message because you are subscribed to the Google Groups "ORCID API Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
orcid-api-use...@googlegroups.com.
To post to this group, send email to
orcid-a...@googlegroups.com.
Visit this group at https://groups.google.com/group/orcid-api-users.
For more options, visit https://groups.google.com/d/optout.
Thanks I will have a look. I guess my best option is to use GUI.
--
You received this message because you are subscribed to the Google Groups "ORCID API Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to orcid-api-users+unsubscribe@googlegroups.com.
To post to this group, send email to orcid-api-users@googlegroups.com.