donate-api-key header.
When you need a key
A key is required when an operation acts for your project or reads what belongs to it. Everything else is a public read.
Send the key on a public read too: the call then counts against your organization’s
rate limit instead of the 20 a minute an IP address gets. An integration that
runs on your backend sends it on every call.
The three reads about your own things answer for your project only. A config of another project
answers
403 with FORBIDDEN on its stats and donors, and a donation source of another project
answers 404.
Call from your server
The API accepts browser requests from Donate’s own sites only. A request from a page on your domain is blocked by CORS whether or not it carries a key. Make every call from your server, and never put the key in code that runs on someone else’s device.When authentication fails
A missing key and a key that is not valid are the same answer:401 with UNAUTHENTICATED.
- A key that is not valid fails a public read too. If you send a key, it must be valid.
- A path that does not exist is
404, not401. A mistyped path answersROUTE_NOT_FOUNDwith or without a key, so a401always means the key.
400 MISSING_API_KEY and a
wrong one with 403 INVALID_API_KEY; see Errors on v1.