SDK
SDK Basics
Usage of the LeadFinder SDK
Overview
The SDK provides a complete UI component that can be embedded anywhere on your page.
Quick Start
Installation
The SDK is available via CDN and can be included in your HTML page:
<body>
<div id="leadfinder-container"></div>
<script>
// Configure SDK before loading
window.SIFTR_CONFIG = {
apiKey: 'your-api-key-here',
onLoad: (sdk) => {
// SDK is loaded, attach it to your container
const container = document.getElementById('leadfinder-container');
sdk.attach(container);
},
};
</script>
<script type="module" src="https://sdk-staging.siftr.net/sco-sdk.js"></script>
</body>Configuration Options
The SDK can be configured through the window.SIFTR_CONFIG object:
| Option | Type | Required | Description |
|---|---|---|---|
apiKey | string | Yes | Your API key for authentication |
onLoad | function | Yes | Callback function called when SDK is loaded |
API Key
To use the SDK, you'll need an API key. You can obtain one by:
- Logging into your account
- Navigating to API Keys section
- Creating a new API key for your application
Interactive Example
Try out the SDK in this live example:
SDK Integration Flow
Understanding how the SDK integrates with your enterprise system is crucial for successful implementation. Below are two diagrams showing the integration flow:
Best Practices
- Always validate your API key before deploying to production
- Handle loading states while the SDK initializes
- Implement error boundaries to gracefully handle SDK errors
- Keep your Private API key secure - never expose it in client-side code in production
Troubleshooting
Common Issues
SDK not loading:
- Verify your API key is correct
- Check browser console for error messages
- Ensure the container element exists before calling
attach()
Theming & Customization
Want to match your brand? Check out our comprehensive theming guide:
- SDK Theming Documentation - Complete guide to customizing your SDK appearance
- Learn how to use popular theme generators like shadcn/ui
- Built-in presets for quick setup
- Dynamic theme switching capabilities
Support
For additional help and support:
- Check our SDK Theming guide for customization help
- Check our API documentation
- Review the interactive examples above