Skip to main content

How do I authenticate?

Send your API key in the x-api-key header of every request, from the server whose IP address is registered for that key.

Every request carries the key in an HTTP header:

x-api-key: YOUR_API_KEY

Keys have the form hma_<prefix>_<secret>. A key is shown once, when it is created, so put it in your server’s secret store straight away. Keep it on the server: never put it in a browser, a mobile app or a public repository.

A request without a recognised key is refused with unauthenticated (HTTP 401). A valid key used from an address that is not registered for it is refused with ip_not_allowed (HTTP 403).

Still need help?

If this did not answer your question, get in touch and we will help.

Contact support