Skip to main content

SDKs & Code Examples

Accelerate your integration using our official SDKs. These libraries handle authentication, retries, and data processing automatically.


Official SDKs

LanguageInstallationRepository
Node.jsnpm install wecheck-sdkGitHub
Pythonpip install wecheck-pythonGitHub

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/catch blocks to handle network timeouts or invalid API keys.