Basic service authentication and registration

To have access to the following functionalities you need to login to OpenAIRE. In case you are not already a member you will need to register first and provide your Personal information.

New! The registration process has been updated! In order to visit the Personal Token and Registered Services functionalities you need to fill in the Personal Information form available here. This update will not affect the operation of your existing services. However, if you want to register a new service or access/modify an existing one, you will need to provide your personal information first.

For the Basic Authentication method the OpenAIRE AAI server generates a pair of Client ID and Client Secret for your service upon its registration. The service uses the client id and client secret to obtain the access token for the OpenAIRE APIs. The OpenAIRE AAI server checks whether the client id and client secret sent is valid.

How to register your service

To register your service you need to:

  1. Go to your Registered Services page and click the + New Service button.
  2. Provide the mandatory information for your service.
  3. Select the Basic Security level.
  4. Click the Create button.

Once your service is created, the Client ID and Client Secret will appear on your screen. Click "OK" and your new service will be appear in the list of your Registered Services page.

How to make a request

Step 1. Request for an access token

To make an access token request use the Client ID and Client Secret of your service.

	curl -u {CLIENT_ID}:{CLIENT_SECRET} \
	-X POST 'https://aai.openaire.eu/oidc/token' \
	-d 'grant_type=client_credentials'

where {CLIENT_ID} and {CLIENT_SECRET} are the Client ID and Client Secret assigned to your service upon registration.

The response is:

{
	"access_token": ...,
	"token_type": "Bearer",
	"expires_in": ...
}

Store the access token confidentially on the service side.

Step 2. Make a request

To access the OpenAIRE APIs send the access token returned in Step 1.

	GET https://api.openaire.eu/{resourceServicePath}
	Authorization: Bearer {ACCESS_TOKEN}

Error messages

401 - Missing username or/and password

{
	"error": "unauthorized",
	"error_description": "Client id must not be empty!"
}

401 - Wrong username or/and password

{
	"error": "unauthorized",
	"error_description": "Bad credentials"
}

400 - Missing grant type

{
	"error": "invalid_request",
	"error_description": "Missing grant type"
}

400 - Wrong grant type

{
	"error": "unsupported_grant_type",
	"error_description": "Unsupported grant type: ..."
}