Integrate ConnectHub SDKs

Add powerful social features to your application in minutes. Our SDKs provide seamless access to feeds, authentication, media sharing, and real-time interactions across all major platforms.

â„šī¸
All SDKs support OAuth 2.0 authentication, offline caching, and GDPR-compliant data handling. Minimum versions: iOS 14+, Android API 24+, Node 16+.

Available SDKs

Quick Start

Install the SDK and initialize the client in three simple steps.

1. Installation

Terminal (npm)
npm install @connecthub/sdk
Terminal (CocoaPods)
pod install ConnectHub
Gradle (build.gradle)
implementation 'com.connecthub:sdk-android:2.4.0'

2. Initialize Client

JavaScript / TypeScript
import { ConnectHub } from '@connecthub/sdk';

// Initialize with your API credentials
const client = new ConnectHub({
  appId: 'app_8x2k9s...',
  apiKey: 'ch_live_sk_...',
  environment: 'production'
});

// Ready to use!
console.log('ConnectHub initialized');
Swift
import ConnectHub

let config = CHConfig(
    appId: "app_8x2k9s...",
    apiKey: "ch_live_sk_..."
)

CHClient.initialize(with: config) { error in
    guard error == nil else { return }
    print("ConnectHub initialized")
}

3. Load a Feed

Fetch and display a personalized feed with just a few lines of code.

JavaScript
async function loadFeed() {
    try {
        const feed = await client.feeds.get('user_123', {
            type: 'timeline',
            limit: 20
        });
        
        console.log(`Loaded ${feed.posts.length} posts`);
        renderFeed(feed.posts);
    } catch (err) {
        console.error('Failed to load feed:', err);
    }
}
âš ī¸
Security Note: Never expose your secret API keys in client-side code. Use environment variables or server-side proxies for sensitive operations.

SDK Capabilities

Feature iOS Android Web React Native Flutter
OAuth Login ✅ ✅ ✅ ✅ ✅
Smart Feed ✅ ✅ ✅ ✅ ✅
Live Streaming ✅ ✅ ✅ ✅ âš ī¸ Beta
Media Upload ✅ ✅ ✅ ✅ ✅
Real-time Events ✅ ✅ ✅ ✅ ✅
Offline Cache ✅ ✅ âš ī¸ Limited ✅ ✅
Analytics ✅ ✅ ✅ ✅ ✅

Authentication Flow

All SDKs support ConnectHub's unified authentication protocol. You can use native login modals or integrate your own UI.

React / TypeScript
const { user, login, logout, isAuthenticated } = useConnectAuth();

// Trigger native login modal
await login({
    provider: 'connecthub',
    scope: 'read:feed write:posts social:profile'
});

// Check session
if (isAuthenticated) {
    console.log(`Welcome back, ${user.name}!`);
}

Supported Providers

Need help integrating?

Our developer support team is available 24/7 to help you get started.