React Native quickstart
- 1
Install
bashgit clone https://github.com/neetixai/liveliness-sdks npm i ./liveliness-sdks/packages/react-nativeBoth packages must land together — the RN package links the web core as
file:../web. - 2
Get a test key
bashcurl -X POST https://liveliness.neetix.in/v1/signup \ -H 'Content-Type: application/json' \ -d '{"email":"you@company.com"}'A key in a mobile bundle is extractableThe JS bundle ships inside the app. Use a test key while building; in production mint short-lived keys from your own backend.
- 3
Use the hook
tsximport { useLiveliness } from "@neetix/liveliness-react-native"; function KycScreen() { const nx = useLiveliness({ apiKey: NEETIX_API_KEY }); const onCapture = async (selfieUri: string, idUri: string) => { const res = await nx.faceMatch(selfieUri, idUri, { clientRefId: "application-4821", }); console.log(res.verdict, res.warnings); }; return <Camera onPhoto={onCapture} busy={nx.loading} />; }The hook takes file URIs, not blobs — hand it whatever
react-native-vision-cameraorexpo-cameragave you. - 4
Branch on the verdict
tsxswitch (res.verdict) { case "approved": return continueJourney(); case "review": return queueForManualReview(res.warnings); case "declined": return stop(res.warnings); }
Hook surface
| Member | Description |
|---|---|
client | The full NeetixClient — every API method |
loading / error | State for the wrapped calls |
liveness(selfieUri) | Passive liveliness (1 credit) |
ageCheck(selfieUri) | Selfie age estimation (1 credit) |
faceMatch(selfieUri, cardUri, opts?) | 1:1 match + liveliness (2 credits) |
authVerify(userId, selfieUri) | Biometric re-authentication (1 credit) |
documentId({ backUri?, frontUri? }) | DL/state-ID barcode parse (2 credits) |
Anything not wrapped by the hook is on nx.client, which is the complete
46-operation web client.
Errors
Failures throw NeetixApiError with status and messageCode. The one to
handle explicitly is HTTP 402 / insufficient_credits — the prepaid balance is
gone and every call fails until a top-up.
Next
- Web / TypeScript — the core client this wraps, and its full method list.
- Get started — verdicts, warnings and credits.