API tokens
Create a token in API tokens, copy it straight away (it is shown once) and send it in a header. Revoke it at once if it leaks.
Create tokens in API tokens. A token starts with clk_. It is shown once, when you create it: we store only a hash, so a lost token cannot be recovered, only replaced.
Using one
Send it in a header, either Authorization: Bearer clk_… or X-API-Token: clk_…. Never put it in a query string or in code other people can read, such as a public web page.
Keeping one safe
- One token per integration, so revoking one does not break the others.
- Give it an expiry date if the job is temporary.
- Restrict it to the IP ranges it will be called from.
- While building against the REST API, use a sandbox token: it runs the real calculators without using your monthly quota, is still rate-limited, and its replies carry
X-Sandbox: true.