White Label Integration

Multi-tenant OAuth2 with your branding

Transform OAuth2 integrations into seamless customer experiences! White labeling lets your users authenticate with services using your branding while Airweave handles all the complex OAuth2 infrastructure behind the scenes.

🎨 Your Brand, Our Infrastructure

Customers see “YourApp wants to access Google Drive” instead of “Airweave wants to access Google Drive” - but you get all the power of Airweave’s data sync platform.

Why White Label?

Professional Branding

Users see your company name throughout the entire OAuth experience

Seamless Integration

OAuth flows feel like a native part of your application

Multi-Tenant Ready

Automatic data isolation per customer with zero configuration

How It Works

1

Configure Integration

Create a white label with your OAuth2 app credentials and branding

2

Generate Auth URL

Get a branded OAuth2 URL for each customer

3

Customer Authenticates

Users see YOUR branding during the OAuth flow

4

Automatic Data Sync

Airweave creates source connections and starts syncing data with proper isolation

Quick Start

1. Create White Label Configuration

First, set up your white label integration with your OAuth2 app credentials:

Create White Label Integration
$curl -X POST "https://api.airweave.ai/white-labels/" \
> -H "Content-Type: application/json" \
> -H "x-api-key: YOUR_API_KEY" \
> -d '{
> "name": "Customer Portal Integration",
> "source_short_name": "google_drive",
> "redirect_url": "https://yourapp.com/oauth/callback",
> "client_id": "123456789-abc.apps.googleusercontent.com",
> "client_secret": "GOCSPX-your-oauth-secret",
> "allowed_origins": "https://yourapp.com,https://app.yourapp.com"
> }'

2. Generate Customer Auth URLs

For each customer who wants to connect their account:

Get Customer Auth URL
$curl -X GET "https://api.airweave.ai/white-labels/{integration_id}/oauth2/auth_url?state={customer_id}" \
> -H "x-api-key: YOUR_API_KEY"

3. Handle OAuth Callback

When the customer completes OAuth, handle the callback:

Exchange OAuth Code
$curl -X POST "https://api.airweave.ai/white-labels/{integration_id}/oauth2/code" \
> -H "Content-Type: application/json" \
> -H "x-api-key: YOUR_API_KEY" \
> -d '{
> "code": "oauth_authorization_code",
> "source_connection_in": {
> "name": "Customer Google Drive",
> "collection": "customer-data",
> "sync_immediately": true
> }
> }'

Complete Integration Example

Here’s a full example showing how to integrate white labeling into a React application:

React Component with White Label
1import { useState } from 'react';
2import { Button } from '@/components/ui/button';
3import { ExternalLink } from 'lucide-react';
4
5interface ConnectServiceProps {
6 customerId: string;
7 integrationId: string;
8}
9
10export function ConnectService({ customerId, integrationId }: ConnectServiceProps) {
11 const [connecting, setConnecting] = useState(false);
12
13 const handleConnect = async () => {
14 try {
15 setConnecting(true);
16
17 // Get the branded OAuth URL
18 const response = await fetch(
19 `/api/integrations/${integrationId}/auth-url?customer=${customerId}`,
20 { headers: { 'Authorization': `Bearer ${apiKey}` } }
21 );
22
23 const { authUrl } = await response.json();
24
25 // Redirect to branded OAuth flow
26 window.location.href = authUrl;
27
28 } catch (error) {
29 console.error('Failed to initiate connection:', error);
30 } finally {
31 setConnecting(false);
32 }
33 };
34
35 return (
36 <Button
37 onClick={handleConnect}
38 disabled={connecting}
39 className="w-full"
40 >
41 {connecting ? (
42 'Connecting...'
43 ) : (
44 <>
45 Connect Google Drive <ExternalLink className="ml-2 h-4 w-4" />
46 </>
47 )}
48 </Button>
49 );
50}

Example Demo Application

What Happens Behind the Scenes

Airweave securely stores OAuth2 tokens and handles automatic refresh. Your customers never need to re-authenticate unless they revoke access.

Each successful OAuth flow creates a source connection in the specified collection, ready to sync data immediately.

Customer data is automatically isolated using the state parameter you provide. No risk of data mixing between customers.

If sync_immediately is true, data sync starts in the background as soon as the connection is created.

Security & Best Practices

🔒 OAuth2 Credentials Security

Never expose credentials in frontend code. Always handle OAuth2 flows on your backend and store credentials securely.

🛡️ Security Guidelines

Use HTTPS everywhere for redirect URLs and origins Validate state parameters to prevent CSRF attacks Store secrets securely using environment variables or secret managers Rotate credentials regularly for enhanced security

📈 Performance Tips

Cache auth URLs temporarily to reduce API calls Use webhooks to get notified when syncs complete Monitor sync status to handle failures gracefully Set up alerts for authentication errors

Troubleshooting

Common causes:

  • Incorrect redirect URL in OAuth app settings
  • Missing required scopes
  • Invalid client credentials

Solutions:

  • Verify redirect URL matches exactly (including protocol)
  • Check OAuth app configuration in the service’s developer console
  • Ensure client_id and client_secret are correct

Common causes:

  • Origin not included in allowed_origins
  • HTTP vs HTTPS mismatch

Solutions:

  • Add your domain to the allowed_origins field
  • Ensure protocol matches (use HTTPS in production)

Common causes:

  • Insufficient OAuth permissions
  • Token expiration without refresh token

Solutions:

  • Request broader OAuth scopes
  • Verify refresh tokens are being stored and used

Next Steps

🎉 Ready to Go!

Your customers will now see a professional, branded OAuth experience while you get all the benefits of Airweave’s powerful data synchronization platform.