Skip to content
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

Client ID not found on sandbox.orcid.org (but ok at www.orcid.org) and OAUTH code not working? #6775

Closed
yhan818 opened this issue Apr 17, 2023 · 1 comment

Comments

@yhan818
Copy link

yhan818 commented Apr 17, 2023

I have an issue with Client ID and OAuth code

I used R package to query ORCID. A week ago I was able to query and also ran employment with ORCID. It seems something went wrong that now I even have issue with my client ID.

I read README.md at https://github.com/ORCID/ORCID-Source/tree/development/orcid-api-web

  1. I tested my client ID with this curl command1
    https://sandbox.orcid.org/oauth/authorize?client_id=APP-56WL1F7H14FSAJT6&response_type=code&scope=/authenticate&redirect_uri=https://developers.google.com/oauthplayground

Response is "Error: The provided client id APP-56WL1F7H14FSAJT6 is invalid.".

  1. I also test another command 2.

curl -i -d 'client_id=APP-56WL1F7H14FSAJT6' -d 'client_secret={} -d 'scope=/read-public' -d 'grant_type=client_credentials' 'https://www.orcid.org/oauth/token'

I got a response of "{"error":"invalid_client","error_description":"Client not found: APP-56WL1F7H14FSAJT6"}(base)"

  1. I logged into my ORCID and test this
    https://orcid.org/oauth/authorize?client_id=APP-56WL1F7H14FSAJT6&response_type=code&scope=/authenticate&redirect_uri=https://www.orcid.org/
    Response: "UA Scholary Dataset has asked for the following access to your ORCID record."

So based on response from command1, my client ID is not working on sandbox??
For 3, it is somehow working.

I am confused with all these responses. The code was working one week ago and now everything is not working right. I assume either my client_id, client_secret, or ORCID_TOKEN is not working right. Any help will be much appreciated!

@amontenegro
Copy link
Member

Hi @yhan818,

Your client APP-56WL1F7H14FSAJT6 was created in our production env, orcid.org, so, it does not exists in the testing env sandbox.orcid.org

So, if you change your url to use the orcid.org site it should work:

https://orcid.org/oauth/authorize?client_id=APP-56WL1F7H14FSAJT6&response_type=code&scope=/authenticate&redirect_uri=https://developers.google.com/oauthplayground

and the token should also work when you using in the pub.orcid.org API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants