Overview
The Fraudiant API uses Bearer token authentication to secure all API endpoints. You must include your API key in theAuthorization header of every request.
Getting Your API Key
To obtain your API credentials:1
Register an Account
Sign up at app.fraudiant.com to create your free account.
2
Access the Dashboard
Log in to your dashboard after registration.
3
Navigate to API Keys
Go to the API Keys section from the main navigation.
4
Generate or Retrieve Keys
Create a new API key or copy an existing one. You can create separate keys for different environments.
Authentication Methods
Recommended: Authorization Header
The recommended and most secure method is to include your API key in theAuthorization header using the Bearer token format:
Not Recommended: Query Parameter
- API keys appear in server logs
- Keys are visible in browser history
- URLs may be cached or stored by proxies
- Risk of accidental exposure when sharing URLs
Security Best Practices
Store API keys as environment variables
Store API keys as environment variables
Never hardcode API keys directly in your source code. Use environment variables or secret management systems:
Use separate keys for different environments
Use separate keys for different environments
Create distinct API keys for development, staging, and production environments. This makes it easier to rotate keys and debug issues without affecting production.
Rotate keys regularly
Rotate keys regularly
Periodically regenerate your API keys, especially after team member departures or if you suspect a key has been compromised.
Restrict key permissions
Restrict key permissions
If available, use API keys with the minimum necessary permissions for your use case.
Never commit keys to version control
Never commit keys to version control
Add your environment files (
.env, .env.local, etc.) to .gitignore to prevent accidental commits:Monitor API key usage
Monitor API key usage
Regularly review API usage in your dashboard to detect any unusual activity that might indicate a compromised key.
Error Responses
401 Unauthorized
Returned when the API key is missing, invalid, or expired:- Missing
Authorizationheader - Invalid or expired API key
- Incorrect Bearer token format
403 Forbidden
Returned when the API key doesn’t have permission for the requested resource:Testing Your Authentication
Use this simple test to verify your authentication is working:200 status code with email validation data.
If you receive a
401 Unauthorized error, double-check that your API key is correct and properly formatted in the Authorization header.