GuidesAuthentication
Authentication
Send your key as a bearer token in the Authorization header:
Authorization: Bearer $AINSOF_API_KEY- Keep your key on your server. Never put it in a web page, a mobile app bundle or a public repository. Call the API from your backend and pass the results on.
- Shown once. AINSOF does not store the key itself, only a fingerprint of it, so a lost key cannot be recovered. Create a new one and revoke the old one.
- Manage keys at ainsof.io/account/api-keys: name them, see their usage and revoke them. An account can hold up to 5 active keys.
- Refusals: an unrecognised key returns
401 unauthorized, a revoked key403 forbidden. AnyAuthorizationheader is treated as a key; to call without one, leave the header out.
