Note: NPM package coming soon for React/bundler integration.
Step 2: Add to Your App (Sandbox)
Start with sandbox environment for testing:
<divid="sync-widget"></div><scriptsrc="https://sync.brandclub.com/sync-sdk/latest/sdk.umd.js"></script><script>BrandclubSync.init({clientId: "bc_your_app_id", // Replace with your client IDenvironment: "sandbox", // Use sandbox API for testingcontainer: document.getElementById("sync-widget"),onSync: (result) => {console.log("Sync complete!", result); // Refresh your data here }, });</script>
Step 3: Test It
Open your app. The widget handles the entire user experience:
User Experience Flow
1. Sign In (Phone Authentication)
User enters their phone number
Receives a 6-digit OTP code via SMS
Enters the code to authenticate
Their phone number becomes their portable identity across all Sync As A Service-powered apps
2. Connect Retailers
Widget shows a grid of available retailers (Amazon, Walmart, Target, etc.)
User selects a retailer to connect
Enters their retailer username/password
Credentials are encrypted and never stored by your app
3. Handle MFA (if required)
If the retailer requires MFA, the widget automatically prompts the user
Supports OTP via SMS/email, security questions, and authenticator apps
User completes the challenge without leaving your app
BrandclubSync.init({
clientId: "bc_your_app_id",
environment: "production", // Change to production API
container: document.getElementById("sync-widget"),
widgetVersion: "v1.0.0", // Optional: pin version for stability
});