Integrations Overview
TrustGate provides multiple integration options to fit your technical requirements, from no-code solutions to fully customized API integrations.
Integration Options
1. Hosted Flow (Quickest)
Redirect users to TrustGate-hosted verification:
┌─────────────────────────────────────────────────────────┐
│ YOUR APPLICATION │
│ │
│ User clicks "Verify Identity" │
└─────────────────────────┬───────────────────────────────┘
│
│ Redirect to TrustGate
v
┌─────────────────────────────────────────────────────────┐
│ TRUSTGATE │
│ │
│ Document upload → Biometric → Screening │
└─────────────────────────┬───────────────────────────────┘
│
│ Redirect back with result
v
┌─────────────────────────────────────────────────────────┐
│ YOUR APPLICATION │
│ │
│ User is verified, continue onboarding │
└─────────────────────────────────────────────────────────┘
Best for:
- Quick implementation
- Mobile and web
- No frontend development needed
2. Embedded SDK
Embed verification UI directly in your app:
import { TrustGate } from '@trustgate/sdk';
const verification = new TrustGate.Verification({
applicantId: 'app_123',
apiKey: 'pk_live_xxx',
containerId: 'verification-container',
onComplete: (result) => {
if (result.status === 'verified') {
proceedToNextStep();
}
}
});
verification.start();
Best for:
- Seamless user experience
- Brand consistency
- More control over flow
3. API Integration
Full control with direct API calls:
# 1. Create applicant
curl -X POST https://api.bytrustgate.com/v1/applicants \
-H "Authorization: Bearer tg_live_xxx" \
-d '{"first_name": "John", "last_name": "Doe"}'
# 2. Upload document
curl -X POST https://api.bytrustgate.com/v1/documents \
-H "Authorization: Bearer tg_live_xxx" \
-F "applicant_id=app_123" \
-F "type=passport" \
-F "file=@passport.jpg"
# 3. Run verification
curl -X POST https://api.bytrustgate.com/v1/verifications \
-H "Authorization: Bearer tg_live_xxx" \
-d '{"applicant_id": "app_123", "checks": ["document", "biometric"]}'
Best for:
- Custom workflows
- Backend-to-backend
- Maximum flexibility
Quick Start
Step 1: Get API Keys
- Log in to the TrustGate Dashboard
- Navigate to Settings → API Keys
- Create keys for sandbox (testing) and production
Step 2: Choose Integration Method
| Method | Effort | Control | Best For |
|---|---|---|---|
| Hosted Flow | Low | Low | MVP, quick launch |
| Embedded SDK | Medium | Medium | Branded experience |
| API | High | High | Custom workflows |
Step 3: Implement
Hosted Flow
// Generate verification link
const response = await fetch('https://api.bytrustgate.com/v1/verification-links', {
method: 'POST',
headers: {
'Authorization': 'Bearer tg_live_xxx',
'Content-Type': 'application/json'
},
body: JSON.stringify({
applicant_id: 'app_123',
redirect_url: 'https://your-app.com/verification-complete',
expires_in_minutes: 30
})
});
const { verification_url } = await response.json();
// Redirect user to verification_url
window.location.href = verification_url;
Embedded SDK
<div id="trustgate-container"></div>
<script src="https://cdn.bytrustgate.com/sdk.js"></script>
<script>
TrustGate.init({
publicKey: 'pk_live_xxx',
applicantId: 'app_123',
containerId: 'trustgate-container',
onComplete: function(result) {
console.log('Verification result:', result);
}
});
</script>
API Integration
See API Reference for complete documentation.
Environments
Sandbox
- Base URL:
https://api.sandbox.bytrustgate.com - API Keys: Start with
tg_test_/pk_test_ - No real verifications performed
- Test data and scenarios available
Production
- Base URL:
https://api.bytrustgate.com - API Keys: Start with
tg_live_/pk_live_ - Real verifications
- Billing active
SDKs and Libraries
Official SDKs
| Platform | Package | Documentation |
|---|---|---|
| JavaScript/Node.js | @trustgate/sdk | Coming soon |
| Python | trustgate | Coming soon |
| React Native | @trustgate/react-native | Coming soon |
| iOS | TrustGateSDK | Coming soon |
| Android | com.trustgate:sdk | Coming soon |
Note: SDKs are under development. Use the REST API directly for now — all functionality is available via standard HTTP calls.
Getting Started
All primitives are available via the REST API. No SDK installation required:
# Example: Run a screening check
curl -X POST https://api.bytrustgate.com/api/v1/screen \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "John Doe", "date_of_birth": "1990-01-15"}'
Webhook Integration
Receive real-time updates about verification status:
curl -X POST https://api.bytrustgate.com/v1/webhooks \
-H "Authorization: Bearer tg_live_xxx" \
-H "Content-Type: application/json" \
-d '{
"url": "https://your-app.com/webhooks/trustgate",
"events": [
"applicant.verified",
"applicant.rejected",
"screening.hit"
]
}'
Security Best Practices
- Never expose secret keys in frontend code
- Use public keys for client-side SDK
- Verify webhook signatures to authenticate requests
- Use HTTPS for all API communication
- Rotate keys periodically
Next Steps
- API Keys - Key management
- Webhooks - Real-time notifications
- SDK Integration - Detailed SDK guide
- Webhook Events - Event reference