Authentication
Every request carries your API key in the X-API-Key header.
curl 'https://api.treffer.io/v1/account/credits' \
-H 'X-API-Key: YOUR_API_KEY'
import requests
response = requests.get(
"https://api.treffer.io/v1/account/credits",
headers={"X-API-Key": "YOUR_API_KEY"},
timeout=30,
)
print(response.json())
This call costs nothing, so it is the quickest way to check that a key works.
Getting a key
Sign up and create one in your dashboard.
- • You can hold several keys and disable them individually.
- • A key is shown once, when you create it.
- • We store only a hash, so we cannot read your keys either.
When the key is wrong
A missing, mistyped or disabled key all return the same response.
HTTP 401
{
"error": "invalid_api_key",
"message": "Invalid or missing API key."
}