ORCID Record Action Usage
ORCID Record Action
I developed a GitHub action to automatically fetch record, including personal information, publications, authors, etc. The action page is available at GitHub Action Marketplace, and here is the manual.
ORCID API Configurations
1. Register your personal public API client
Log in your ORCID account and visit the developer tools page, create your personal public API client. Detailed steps please refer the offical document. You can fill in application information and redirect URIs as you like, it has no effect on the subsequent steps.
Please remember your Client ID and Client secret.
2. Get your access token
In command line, use your Client ID and Client secret to get your access token. It should have a very long expiration time (about 20 years):
1 |
|
Then you may get a response in JSON format:
1 |
|
Please remember the access_token.
Inputs
orcid-id
Required The ORCID ID of researcher.
access-token
Required The ORCID access token obtained above.
record-file
Optional The record json file to write. If this input was given, the output record
will not be generated.
Outputs
record
The record string in JSON format. This output only exists when the record-file
input is not given.
Example usage
1. (Optional) Save your access token and other variables in GitHub
Create a new repository secret in https://github.com/USERNAME/REPOSITORY/settings/secrets/actions, create a new repository secret to store your access_token obtained above. Here we name it ORCID_ACCESS_TOKEN.
Further, in this page, switch to the Variables tab, create follow variables for your workflow:
Name | Description | Example |
---|---|---|
ORCID_ID | Your ORCID id. | XXXX-XXXX-XXXX-XXXX |
ORCID_ACCESS_TOKEN | The ORCID public api access token. | xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx |
RECORD_FILE | The related path of the works file in your repository. | assets/record.json |
2. Create an action to auto update your ORCID record.
The workflow’s code is as follows:
1 |
|