curl -i -v -H 'Accept: application/json' -d 'client_id=0000-0002-9353-5519&client_secret=1470a572-1e0d-4e7d-899a-c9eafca4e05d&scope=/read-public&grant_type=client_credentials' 'http://api.sandbox-1.orcid.org/oauth/token'
vs
curl -i -L -H 'Accept: application/json' 'http://api.sandbox-1.orcid.org/oauth/token'
Looking at https://hc.apache.org/httpcomponents-client-ga/quickstart.html I would be temped use UrlEncodedFormEntity, but that would just be a guess.
Cheers,
Rob
--
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 http://groups.google.com/group/orcid-api-users.
For more options, visit https://groups.google.com/groups/opt_out.
The library as a whole is really easy to use. It'll handle the OAuth part, generate auth requests and turning authcodes into tokens. It'll handle search, profile reads and updating works. Adding other calls to the API should be really easy. Oh, and it can be added with Maven. See https://github.com/TomDemeranville/orcid-java-client for docs and maven instructions.
Turning an auth code into a token is as simple as creating a client using your credentials and calling a method.
OrcidOAuthClient client = new OrcidOAuthClient("OrcidClientID","OrcidClientSecret",("OrcidReturnURI"),useSandbox);
OrcidAccessTokenResponse token = client.getAccessToken(authCode);
What are you trying to achieve? I could probably add the call to the library.
Tom.
> ????????,??????????????????????????????
> ??,??????,?????
> --
> ?????,?????????~~~>"<
> --
>
> --
> 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 <mailto:orcid-api-users%2Bunsu...@googlegroups.com> .
> To post to this group, send email to orcid-a...@googlegroups.com.
> Visit this group at http://groups.google.com/group/orcid-api-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>
> --
>
> Robert Peters
> Lead Developer at ORCID.org <http://orcid.org/>
>
> Cellphone: +1.805.440.9056 <tel:%2B1.805.440.9056>
>
> Email: r.pe...@orcid.org
> Skype: rcpeters
> Timezone: PST
>
> --
> 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 <mailto:orcid-api-users%2Bunsu...@googlegroups.com> .
> To post to this group, send email to orcid-a...@googlegroups.com.
> Visit this group at http://groups.google.com/group/orcid-api-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>
> --
> Thank you,
>
> Suman Upadhyay
>
> --
> 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 <mailto:orcid-api-users%2Bunsu...@googlegroups.com> .
> To post to this group, send email to orcid-a...@googlegroups.com.
> Visit this group at http://groups.google.com/group/orcid-api-users.
> For more options, visit https://groups.google.com/groups/opt_out.
--
????????,??????????????????????????????
??,??????,?????
--
?????,?????????~~~>"<
--
--
Robert Peters
Lead Developer at ORCID.org
Cellphone: +1.805.440.9056
Email: r.pe...@orcid.org
Skype: rcpeters
Timezone: PST
--