Authentication

Authentication

The authentication should be done providing x-api-key request header.

You should attach your API token per every request:

curl 'https://api.teslahunt.io/cars' \
  --get \
  --data-urlencode 'filterByFormula=AND(NOT(tax=BLANK()),{currency}="EUR",{modelLetter}="S",{year}=2024)' \
  --header 'x-api-key: YOUR_TOKEN'

The authentication has been done successfully is HTTP response status code is 200:

curl -I 'https://api.teslahunt.io/cars' \
  --get \
  --data-urlencode 'filterByFormula=AND({currency} = "EUR")' \
  --header 'x-api-key: YOUR_TOKEN'
# HTTP/2 200

Every token credential is unique. Be sure to keep it secured. Don't share your secret API key in publicly accessible areas such as GitHub, client-side code, and so forth.

If your token credential has been compromised, please contact us.