Skip to main content

Authentication

All Bitrace AML API requests require authentication using an API key.

API Key

You authenticate requests by including your API key in the X-Access-Key header.
Keep your API key secure! Never share it in public repositories or client-side code.

Making Authenticated Requests

Include your API key in the request header:

Security Best Practices

  1. Environment Variables: Store your API key in environment variables
  2. Never commit API keys: Add .env files to your .gitignore
  3. Rotate keys regularly: Periodically update your API keys
  4. Use different keys for dev/prod: Use separate API keys for development and production environments
  5. Monitor usage: Keep track of your API usage to detect any unauthorized access

Error Handling

If your API key is invalid or missing, you’ll receive a 401 Unauthorized response: