Authenticating with DCH API

Valid authentication of a user is required for access to DCH systems. An API key can be generated and registered to your DCH account. This key can then be used to successfully provide authentication credentials with DCH requests.

Authenticating

Generating an API key

  1. Firstly, we will need to login to the DCH dashboard via https://dataclearinghouse.org/dashboard/. Once logged in, navigate to the API Keys section under "Settings" → "API Keys".

  2. Create a new API key using the "Create a new key" button.

  3. To easily identify the key being created, provide a name for the new key. Optionally, an expiry date can be added to ensure the key is not usable after a certain date. Ensure that the key is enabled and press "Submit".

  4. The API key will be shown where "MY API KEY" appears in the screenshot below. Press the "Copy" button (or copy the key manually) and safely store this key for future use.

Using an API key

To authenticate with DCH endpoints, the X-Api-Key header can be populated with the API key we generated previously.

Authenticated DCH request

curl -X 'GET' \
  'https://dataclearinghouse.org/api/aletheia/v1/points' \
  -H 'accept: application/json' \
  -H 'X-Api-Key: MY API KEY'

Last updated