Code samples
There are no packaged SDKs. The HTTP API is the contract, and these samples are small enough to copy.
| Language | File |
|---|---|
| cURL | examples/curl/quickstart.sh |
| Python | examples/python/quickstart.py |
| Node / TypeScript | examples/node/quickstart.ts |
| Laravel / PHP | examples/laravel/WarkaClient.php |
| Expo, Android, iOS | examples/mobile/README.md |
AttendanceController.php
$session = $warka->startSession($employee->warka_identity_id);
// Return capture_token and upload_url to the app. The API key stays here.
$result = $warka->verify($employee->warka_identity_id, $sessionId);
match ($warka->nextStep($result)) {
'record_attendance' => Attendance::record($employee),
'supervisor_queue' => ReviewQueue::push($employee, $result['id']),
'ask_employee_to_retry' => response()->json(['retry' => $result['guidance']]),
default => ExceptionProcess::open($employee, $result['id']),
};