SDKs & Code Examples
Accelerate your integration using our official SDKs. These libraries handle authentication, retries, and data processing automatically.
Official SDKs
| Language | Installation | Repository |
|---|---|---|
| Node.js | npm install wecheck-sdk | GitHub |
| Python | pip install wecheck-python | GitHub |
Code Examples
Client Initialization (Node.js)
const WeCheck = require('wecheck-sdk');
const client = new WeCheck({
apiKey: 'YOUR_API_KEY',
environment: 'production' // or 'sandbox'
});
Start a Scan
async function startVetting(email) {
const scan = await client.scans.create({
email: email,
facial_recognition: true
});
console.log(`Scan started with ID: ${scan.id}`);
}
Retrieve Results
async function getReport(scanId) {
const report = await client.scans.retrieve(scanId);
console.log(`Risk Score: ${report.risk_score}`);
}
Best Practices
- Environment Variables: Never hardcode your API key. Use
process.env.WECHECK_API_KEY. - Error Handling: Wrap all SDK calls in
try/catchblocks to handle network timeouts or invalid API keys.