Documentation

Authentication

Every API call is authenticated with three HTTP headers. Your SecretKey is never transmitted - it is only used to derive the token.

ParameterLocated inDescription
ApiKeyHTTP headerIdentifies your API account. If it is ever exposed, contact support immediately so we can rotate it for you.
TimespanHTTP headerUnix timestamp, second precision.
TokenHTTP header32-character uppercase MD5 hash of ApiKey + Timespan + SecretKey.
SecretKeyDo not transmitKeep it secure. Open the avatar menu and choose My account - Credentials & access.

Token generation

import hashlib, time, requests

API_KEY    = "YOUR_API_KEY"
SECRET_KEY = "YOUR_SECRET_KEY"

timespan = str(int(time.time()))
token = hashlib.md5((API_KEY + timespan + SECRET_KEY).encode()).hexdigest().upper()

headers = {
    "ApiKey":   API_KEY,
    "Timespan": timespan,
    "Token":    token,           # 32-char UPPERCASE MD5
    "Content-Type": "application/json",
}
resp = requests.get(BASE_URL + ENDPOINT, params=params, headers=headers)
data = resp.json()               # check data["status"], not just HTTP 200

The two classic mistakes behind error 115: a lowercase token (it must be uppercase MD5) and server clock drift (the Timespan is valid for 300 seconds).