Skip to main content

API Authentication Guide

Learn how to authenticate your requests to all Fashion.AI APIs using secure app tokens.

Overview

All FashionAI APIs (Search, Personalization, Analytics) use the same authentication method with app tokens. This unified approach simplifies integration and allows you to use a single token across all services.

Authentication Method

All APIs use Bearer Token Authentication via custom headers.

Required Headers

HeaderRequiredDescription
Content-TypeYesMust be application/json
X-FashionAI-APP-TokenYesYour application token

Obtaining Your Token

Step 1: Access Dashboard

  1. Log into your FashionAI Dashboard
  2. Navigate to API Settings in the sidebar
  3. Click on API Tokens section

Step 2: Generate Token

  1. Click "Generate New Token"
  2. Enter a descriptive name (e.g., "Production API Token")
  3. Click "Create Token"

App Token Generation

Step 3: Copy Token

# Your token will look like this:
X-FashionAI-APP-Token: fai_live_sk_1234567890abcdef...

⚠️ Important: Copy and store your token immediately. It won't be shown again for security reasons.

Common Issues

  1. Wrong Header Name
    // ❌ Wrong
    headers: { 'Authorization': 'Bearer ' + token }

    // ✅ Correct
    headers: { 'X-FashionAI-APP-Token': token }

Next Steps

Now that you understand authentication, explore specific APIs: