Overview
All Factify API requests require authentication via Bearer tokens. This guide explains how to obtain and use your API credentials.Getting Your API Key
- Log in to the Developer Dashboard
- Navigate to Manage > API Keys
- Click Create API Key
- Copy your key immediately - it won’t be shown again
Using Your API Key
Include your API key in theAuthorization header of every request:
SDK Configuration
The SDKs handle authentication automatically once configured:Environment Variables
We recommend storing your API key in environment variables:.env
- Development
- Production
Use a
.env file with a tool like dotenv:API Key Format
Factify API keys follow a structured format that includes environment indicators and embedded identifiers for efficient lookup:Key Components
| Component | Description |
|---|---|
ffy | Factify identifier (enables security scanners to detect leaked keys) |
live/test | Environment indicator |
| UUID7 | Time-sortable identifier for O(1) database lookup |
| Random | 256-bit entropy secret |
Environment Types
| Type | Prefix | Environment | Capabilities |
|---|---|---|---|
| Test | ffy_test_ | Sandbox | Full API access, no real data |
| Live | ffy_live_ | Production | Full API access, real data |
Key Rotation
To rotate your API key:- Generate a new key in the dashboard
- Update your application with the new key
- Verify the new key works
- Revoke the old key
You can have up to 5 active API keys at once, allowing for zero-downtime rotation.
Authentication Errors
| Status | Error | Solution |
|---|---|---|
401 | invalid_api_key | Check your API key is correct |
401 | expired_api_key | Generate a new key in the dashboard |
403 | insufficient_permissions | Contact support to upgrade your plan |
Example Error Response