Skip to main content

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

  1. Log in to the TrustGate Dashboard
  2. Navigate to Settings → API Keys
  3. Create keys for sandbox (testing) and production

Step 2: Choose Integration Method

MethodEffortControlBest For
Hosted FlowLowLowMVP, quick launch
Embedded SDKMediumMediumBranded experience
APIHighHighCustom 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

PlatformPackageDocumentation
JavaScript/Node.js@trustgate/sdkComing soon
PythontrustgateComing soon
React Native@trustgate/react-nativeComing soon
iOSTrustGateSDKComing soon
Androidcom.trustgate:sdkComing 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

  1. Never expose secret keys in frontend code
  2. Use public keys for client-side SDK
  3. Verify webhook signatures to authenticate requests
  4. Use HTTPS for all API communication
  5. Rotate keys periodically

Next Steps