Nyota ID
Web & Mobile SDKs
Integrating the Nyota ID verification modal into your applications.
Once your backend generates a verificationUrl, pass it to your frontend application to launch the Nyota ID modal.
Web SDK (React / Next.js / Vanilla JS)
The Web SDK launches a responsive, accessible modal directly over your current DOM, ensuring the user never leaves your website.
Installation:
npm install @nyota/verify-web-sdkUsage:
import { NyotaIdSdk } from "@nyota/verify-web-sdk";
// Call this from a button click or useEffect after fetching the URL from your backend
NyotaIdSdk.startVerification({
url: "https://verify.nyotaimara.com/session/sess_123",
onComplete: (result) => {
if (result.status === "completed") {
console.log("User finished the flow!");
// Show a loading spinner while waiting for the backend webhook to arrive
} else {
console.log("User cancelled or closed the modal.");
}
},
});React Native SDK (iOS & Android)
The React Native SDK leverages native camera bindings for high-quality document scanning and biometric liveness detection.
Installation:
npm install @nyota/verify-react-native @didit-protocol/sdk-react-nativeUsage:
import NyotaIdSdk from "@nyota/verify-react-native";
import { Button } from "react-native";
export default function VerificationScreen() {
const handleVerify = () => {
NyotaIdSdk.startVerification({
url: "https://verify.nyotaimara.com/session/sess_123",
onComplete: (result) => {
console.log("Verification modal closed with status:", result.status);
},
});
};
return <Button title="Verify Identity" onPress={handleVerify} />;
}Important Security Note: The onComplete callback in the frontend SDKs is
merely a UI hint that the user closed the window. Never use this callback
to permanently grant an account "verified" status. You must wait for the
secure backend Webhook.