Getting started

API keys

Two kinds of key: one for your server, one for the browser. They cannot stand in for each other.

live keys

For calls from your own server. A live key has full access to your plan and must be treated as a password — it must never end up in frontend code, a mobile app or a git repo.

pub keys

For calls from the browser, for instance an address field in a web form. A pub key only works from the domains you have registered on it.

A pub key with no registered domains rejects everything. That is deliberate: an empty
list means the key has not been set up yet — not that everything is allowed. Otherwise a
forgotten pub key would work as a free live key for anyone who found it.

Three ways to send the key

Bash
# 1. Recommended
curl -H "Authorization: Bearer YOUR_KEY" …

# 2. Query parameter — exists for DAWA parity
curl "…?token=YOUR_KEY"

# 3. Own header
curl -H "x-addr-key: YOUR_KEY" …

Use the first one where you can. ?token= ends up in server logs and browser history, so it is only meant for code migrating from DAWA that cannot easily set headers.