How to use the public/member api with the sandbox?

143 views
Skip to first unread message

Cristian Zoicas

unread,
Apr 29, 2016, 4:18:01 AM4/29/16
to ORCID API Users
I have some doubts about how to use the public/member API and the sandbox.

This page

    http://members.orcid.org/api/tutorial-retrieve-orcid-id-curl-v12-and-earlier
   
says that there the following public/members api that can  be used with
both the production/sandbox registry:

    Public API:   http://pub.orcid.org/
    Member API:   https://api.orcid.org/

    Public API Sandbox: http://pub.sandbox.orcid.org/
    Member API Sandbox: http://api.sandbox.orcid.org/

I registered for a sandbox account and I also registered a client application that should to accept ORCID autheticated users.

In this context I imagine that all sandbox public api calls will be
invoked through the URL http://pub.sandbox.orcid.org/

For example:

    http://pub.sandbox.orcid.org/oauth/authorize?client_id=APP-RAX20GKJX2HD09AH&response_type=code&scope=/authenticate&redirect_uri=http://medialab.sissa.it/griffo-wjapp/jhepMT2/orcidauthdone

However this call does not work. I receive the following error message:

     1.2 Please specify a version number (1.2 or higher) : null for uri: http://pub.sandbox.orcid.org/orcid-pub-web/oauth/authorize?client_id=APP-RAX20GKJX2HD09AH&response_type=code&scope=/authenticate&redirect_uri=http://medialab.sissa.it/griffo-wjapp/jhepMT2/orcidauthdone

On the other side If I use the URL

    https://sandbox.orcid.org/oauth/authorize?client_id=APP-RAX20GKJX2HD09AH&response_type=code&scope=/authenticate&redirect_uri=http://medialab.sissa.it/griffo-wjapp/jhepMT2/orcidauthdone

accessible from the "developer tools" section of my account in the area
where I registered my application, the things work and I can get to the
login page. Please also note that this working URL uses "https" instead
of "http" as was mentined in the official documentation above for
Public/Member API Sandbox.

Can somebody explain what is it happening? Are the above URLs for "Public
API Sandbox" and "Member API Sandbox" used form something?

What are the URLs form the Public/Member API sandbox?

Thank you.
Cristian Zoicas



Wilmers, Catalina

unread,
Apr 29, 2016, 4:15:19 PM4/29/16
to Cristian Zoicas, ORCID API Users
Hi Cristian,

The URL to grant authorization doesn't require a the pub/api prefix since it's a URL for the ORCID interface rather than a call to the API. So whether you're using the member or public API the URL will just start with https://sandbox.orcid.org/ (like the link from the developer tools section). It's in the second step with the call to exchange the access token when you'll need the public API URL starting with http://pub.sandbox.orcid.org/...

Sorry if our example page didn't make that clear. If you have a suggestion on how we could improve that page to make it more obvious how the URLs should be constructed, please let us know and we can look into updating the documentation.

Thanks,
-Catalina


--
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.

Reply all
Reply to author
Forward
0 new messages