PHPackages                             gbv/orcid-jskos - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. gbv/orcid-jskos

AbandonedArchivedProject[API Development](/categories/api)

gbv/orcid-jskos
===============

JSKOS wrapper to the public ORCID API

0.2.0(8y ago)238[2 issues](https://github.com/gbv/orcid-jskos/issues)LGPLPHP

Since Aug 10Pushed 8y ago6 watchersCompare

[ Source](https://github.com/gbv/orcid-jskos)[ Packagist](https://packagist.org/packages/gbv/orcid-jskos)[ RSS](/packages/gbv-orcid-jskos/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (5)Versions (6)Used By (0)

This repository contains a wrapper written in PHP to access the public [ORCID API](https://members.orcid.org/api) in [JSKOS format](https://gbv.github.io/jskos/) via [Entity Lookup Microservice API (ELMA)](http://gbv.github.io/elma/).

Background
==========

[](#background)

The [Open Researcher and Contributor ID (ORCID)](https://orcid.org/) is a code to uniquely identify scientific and other academic authors and contributors. ORCID identifiers are a subset of the International Standard Name Identifier (ISNI) consisting of 16 digits in four groups. The final character may also be an `X`. The identifier is prefixed by `http://orcid.org/` to get an URI. For example:

```
0000-0002-2997-7611
http://orcid.org/0000-0002-2997-7611

```

ORCID organization provides [a public API](https://members.orcid.org/api) to access and search for ORCID profiles. Access to the API requires credentials in form of a "client id" and a "client secret" as decribed at .

Requirements
============

[](#requirements)

Requires the [jskos-php](https://packagist.org/packages/gbv/jskos-php) PHP library.

You also need client credentials from your ORCID profile to access the ORIC API.

Installation
============

[](#installation)

```
composer require gbv/jskos-bartoc
```

This will automatically create `composer.json` for your project (unless it already exists) and add orcid-jskos as dependency. Composer also generates `vendor/autoload.php` to get autoloading of all dependencies.

Usage
=====

[](#usage)

Use as library
--------------

[](#use-as-library)

The wrapper can be used as instance of class `ORCIDService`, a subclass of `\JSKOS\Service`:

```
require 'vendor/autoload.php';

$service = new ORCIDService($client_id, $client_secret);
```

See [jskos-php-examples](https://github.com/gbv/jskos-php-examples/) for an example how to use the wrapper as part of a larger PHP application.

Local webservice for testing
----------------------------

[](#local-webservice-for-testing)

To use as server you also need an implementation of `Http\Message\ResponseFactory`, e.g.

```
$ composer require php-http/guzzle6-adapter

```

Locally run the application on port 8080 as following:

```
$ composer install
$ ORCID_CLIENT_ID=... ORCID_CLIENT_SECRET=... php -S localhost:8080

```

You can also put credentials into `credentials.php` as described above.

Given valid credentials, ORCID profiles can be accessed in JSKOS like this:

-
-
-

Webservice via Apache webserver
-------------------------------

[](#webservice-via-apache-webserver)

3. Run `composer install` to download dependencies into directory `vendor`
4. Add a file `credentials.php` with client credentials as following:

    ```
