Using an API Key to authenticate API requests

Modified on Tue, 31 Mar at 12:01 PM

To access HearLinks API, requests must be authenticated using an API key, here is a guide on how to create api keys. This is done by including the key in the request header.


Each API request must include the following header:


Header KeyValue
x-api-ketYOUR_API_KEY


Example:

x-api-key: YOUR_API_KEY


Replace YOUR_API_KEY with the key you generated in the API Keys section.


Example Request

Below is a basic example using curl:


curl https://api.yourdomain.com/endpoint \
  -H "x-api-key: YOUR_API_KEY"


The header tells the API which account is making the request and allows the request to be authenticated.


Using API Keys in API Tools

If you are using Postman or another API client:

  1. Open the request you want to make
  2. Go to the Headers section
  3. Add a new header:
      Key: x-api-key

      Value: YOUR_API_KEY

  4. Send the request


If the key is valid and has the required permissions, the request will be processed successfully.




Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article