Skip to main content
This guide explains how to connect your Box storage to Mixpeek, enabling automated ingestion and processing of files from Box folders.

Prerequisites

  • An active Box account (Business or Enterprise plan recommended for CCG auth)
  • A Box application created at developer.box.com
  • Client ID and Client Secret from your Box app

Authentication Methods

Box supports two authentication methods:
MethodBest ForToken Expiry
OAuth (Developer Token)Development and testing60 minutes
CCG (Client Credentials Grant)Production deploymentsAuto-refreshes
Developer tokens expire after 60 minutes and cannot be refreshed. Use CCG authentication for production workloads.

Configuration Steps

1

Create a Box Application

  1. Go to developer.box.com and sign in
  2. Click My AppsCreate New App
  3. Select Custom App and choose your authentication method:
    • For testing: User Authentication (OAuth 2.0)
    • For production: Server Authentication (Client Credentials Grant)
  4. Name your app and click Create App
  5. In the app’s Configuration tab, note down your Client ID and Client Secret
2

Get a Developer Token (OAuth only)

For quick testing with OAuth:
  1. Open your app in the Box Developer Console
  2. Go to the Configuration tab
  3. Scroll down to Developer Token
  4. Click Generate Developer Token
  5. Copy the token — it’s valid for 60 minutes
Generating a new developer token invalidates the previous one. Store it immediately.
3

Configure CCG (Production)

For production use with Client Credentials Grant:
  1. In your Box app configuration, select App Access Only under App Access Level
  2. Enable Generate User Access Tokens under Advanced Features (if needed)
  3. In the Box Admin Console, approve the app:
    • Go to Admin ConsoleAppsCustom Apps Manager
    • Authorize your CCG app
  4. Note your Enterprise ID from Admin ConsoleEnterprise SettingsAccount Info
4

Add Box Connection in Mixpeek

  1. Navigate to SettingsConnections in Mixpeek Studio
  2. Click Add Connection and select Box
  3. Enter your connection details:
    • Connection Name: A descriptive name (e.g., “Production Box”)
    • Auth Method: Choose OAuth or CCG
    • Client ID: From your Box app configuration
    • Client Secret: From your Box app configuration
    • For OAuth: Access Token (developer token)
    • For CCG: Enterprise ID (from Box Admin Console)
    • Folder ID: Box folder to sync (use 0 for root folder)
  4. Click Test Connection to verify credentials
  5. Click Create Connection

API Configuration

You can also create a Box connection directly via the API:
from mixpeek import Mixpeek

client = Mixpeek(api_key="your-api-key")

# OAuth (developer token)
connection = client.organizations.connections.create(
    name="My Box Storage",
    provider_type="box",
    provider_config={
        "provider_type": "box",
        "credentials": {
            "type": "oauth",
            "client_id": "your-client-id",
            "client_secret": "your-client-secret",
            "access_token": "your-developer-token"
        },
        "folder_id": "0"  # Root folder
    }
)

# CCG (production)
connection = client.organizations.connections.create(
    name="My Box Storage (CCG)",
    provider_type="box",
    provider_config={
        "provider_type": "box",
        "credentials": {
            "type": "ccg",
            "client_id": "your-client-id",
            "client_secret": "your-client-secret",
            "enterprise_id": "your-enterprise-id"
        },
        "folder_id": "0"
    }
)

Setting Up a Sync

Once your connection is created, configure a sync to start ingesting files:
# Create a bucket sync from Box
sync = client.buckets.syncs.create(
    bucket_id="your-bucket-id",
    connection_id="your-connection-id",
    source_path="/",          # Folder path within Box (relative to folder_id)
    sync_mode="incremental",  # Only sync new/changed files
)

Finding Your Folder ID

To sync a specific Box folder (instead of root):
  1. Open Box and navigate to the folder
  2. Look at the URL: https://app.box.com/folder/123456789
  3. The number at the end is your Folder ID
Use 0 for the root folder.

Supported File Types

Mixpeek processes all file types from Box. Common supported formats include:
TypeFormats
DocumentsPDF, DOCX, XLSX, PPTX, TXT
ImagesPNG, JPEG, GIF, WEBP
VideoMP4, MOV, AVI
AudioMP3, WAV, M4A
DataJSON, CSV, XML

Troubleshooting

Developer tokens expire after 60 minutes. Generate a new token from the Box Developer Console and update your connection credentials.For production use, switch to CCG authentication to avoid expiry issues.
Mixpeek uses incremental sync — only new or modified files since the last sync are processed. If you want to re-process all files, delete and recreate the sync configuration to reset the last_sync_at timestamp.
Ensure your CCG app has been authorized in the Box Admin Console:
  1. Go to Admin ConsoleAppsCustom Apps Manager
  2. Find your app and click Authorize
Also verify that the Enterprise ID matches your Box enterprise account.
For OAuth connections, the developer token grants access based on the Box user’s permissions. Ensure the user has access to the target folder.For CCG connections, the app acts as a service account. Use the Box Admin Console to grant the app access to specific folders if needed.