Skip to content

Access Control and Tokens

The data section of data.europa.eu uses a middleware for access control. The middleware handles EU-Login and service accounts. Hence, every interaction with a restricted API endpoint requires an interaction with the middleware to obtain an access token (Party Token).

Service accounts

If you have a service account associated with a catalogue, please see the example below to get an access token. You need to replace CLIENT_ID and CLIENT_SECRET with your credentials.

curl --location 'https://data.europa.eu/auth/middleware/login/service' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
    "client_id": "CLIENT_ID",
    "client_secret": "CLIENT_SECRET"

}'

This will return a response with the format

{
  "access_token" : "ACCESS_TOKEN..."
}

You can use this token to access the APIs of Hub-Repo, and Hub-Store to manage your data.