Skip to main content

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

  1. Log in to the Developer Dashboard
  2. Navigate to Manage > API Keys
  3. Click Create API Key
  4. Copy your key immediately - it won’t be shown again
Keep your API key secure. Never commit it to version control or expose it in client-side code.

Using Your API Key

Include your API key in the Authorization 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
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

Environment Types

Environment in the key must match the server’s runtime environment. Using a ffy_test_ key against production will return an invalid_api_key error.

Key Rotation

To rotate your API key:
  1. Generate a new key in the Developer Dashboard
  2. Update your application with the new key
  3. Verify the new key works
  4. Revoke the old key
You can have up to 5 active API keys at once, allowing for zero-downtime rotation. Manage API Keys →

Authentication Errors

Example Error Response