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
-
Environment Variables: Store your API key in environment variables
-
Never commit API keys: Add
.env files to your .gitignore
-
Rotate keys regularly: Periodically update your API keys
-
Use different keys for dev/prod: Use separate API keys for development and production environments
-
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: