Skip to Content
Hive
Getting started with the API

Authentication

Generates an access token using the credentials created in Hive

Generate an API key from User profile > API Keys in the Hive portal. clientId and the clientSecret necessary to get an access token.

Get the token

Send POST /auth/api-key/login with a body application/x-www-form-urlencoded:

FieldObligationDescription
clientIdYes.Client identifier provided by Hive.
clientSecretYes.API key associated with the client.
curl --request POST \
  --url "https://api.eis.it/auth/api-key/login" \
  --header "Content-Type: application/x-www-form-urlencoded" \
  --data-urlencode "clientId=$EIS_CLIENT_ID" \
  --data-urlencode "clientSecret=$EIS_CLIENT_SECRET"

An answer 200 contains the field access_token. An invalid credential returns 401.

Use the token

Send the token to the header of each subsequent request:

Authorization: Bearer <access_token>

According to the Hive contract, the access token is valid for 24 hours and the API key for 10 years.

Protect Credentials

  • preserves API key and tokens in a secret manager;
  • do not insert them into the source code or in applications executed in the browser;
  • do not register them in logs;
  • immediately replace an exposed credential.

See the section Authorization of reference for the complete endpoint contract.