Quick Start Guide
Get Simplr running in your application in under 5 minutes.
Step 1: Get Your API Key
- Sign up or log in
- Navigate to Settings > API Keys
- Create a new API key
- Copy your secret key (starts with
sk_)
Keep Your Secret Key Safe
Never expose your secret API key in client-side code. It should only be used in your backend.
Step 2: Install the SDK (Frontend)
- npm
- yarn
- Flutter
npm install @simplr-ai/js
yarn add @simplr-ai/js
# pubspec.yaml
dependencies:
simplr_fraud: ^1.0.0
Step 3: Collect Device Signals (Frontend)
- JavaScript
- React
- Flutter
import SimplrFraud from '@simplr-ai/js';
// Initialize the SDK
const simplr = new SimplrFraud({
collectBiometrics: true,
autoStart: true
});
// On form submission, collect signals
async function onSubmit(email) {
const signals = await simplr.collect();
// Send signals to your backend
await fetch('/api/signup', {
method: 'POST',
body: JSON.stringify({
email,
signals: signals
})
});
}
import { SimplrFraudProvider, useSimplrForm } from '@simplr-ai/js/react';
// Wrap your app
function App() {
return (
<SimplrFraudProvider config={{ collectBiometrics: true }}>
<SignupForm />
</SimplrFraudProvider>
);
}
// Use in your form
function SignupForm() {
const { isReady, handleSubmit, trackInput } = useSimplrForm();
const onSubmit = handleSubmit(async (signals) => {
await fetch('/api/signup', {
method: 'POST',
body: JSON.stringify({ email, signals })
});
});
return (
<form onSubmit={onSubmit}>
<input type="email" {...trackInput('email')} />
<button disabled={!isReady}>Sign Up</button>
</form>
);
}
import 'package:simplr_fraud/simplr_fraud.dart';
final simplr = SimplrFraud();
// On form submission
Future<void> onSubmit(String email) async {
final signals = await simplr.collect(context);
// Send signals to your backend
await http.post(
Uri.parse('/api/signup'),
body: jsonEncode({
'email': email,
'signals': signals.toJson()
})
);
}
Step 4: Call the API (Backend)
- Node.js
- Python
- cURL
const response = await fetch('https://api.simplr-ai.com/v1/check', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-API-Key': process.env.SIMPLR_API_KEY
},
body: JSON.stringify({
email: 'user@example.com',
device: signals.device,
behavior: signals.behavior
})
});
const result = await response.json();
console.log('Risk Score:', result.data.risk_score);
import requests
response = requests.post(
'https://api.simplr-ai.com/v1/check',
headers={
'Content-Type': 'application/json',
'X-API-Key': os.environ['SIMPLR_API_KEY']
},
json={
'email': 'user@example.com',
'device': signals['device'],
'behavior': signals['behavior']
}
)
result = response.json()
print(f"Risk Score: {result['content']['risk_score']}")
curl -X POST https://api.simplr-ai.com/v1/check \
-H "Content-Type: application/json" \
-H "X-API-Key: sk_live_xxxxx" \
-d '{
"email": "user@example.com",
"device": {
"fingerprint": "fp_abc123..."
}
}'
Step 5: Handle the Response
{
"success": true,
"content": {
"check_id": "chk_abc123",
"risk_score": 25,
"risk_level": "medium",
"signals": {
"email": {
"is_disposable": false,
"has_breaches": true,
"breach_count": 2,
"domain_age_days": 8520
},
"device": {
"is_new": true,
"is_headless": false,
"fingerprint_hash": "fp_abc123"
}
},
"recommendation": "challenge"
}
}
Risk Levels
| Score | Level | Recommended Action |
|---|---|---|
| 0-24 | Low | Allow |
| 25-49 | Medium | Allow with monitoring |
| 50-69 | High | Challenge (2FA, CAPTCHA) |
| 70-100 | Critical | Block or manual review |
Next Steps
- Authentication - Learn about API key management
- JavaScript SDK - Full SDK documentation
- API Reference - Complete API documentation