Skip to main content

Android SDK

Didit Android SDK for identity verification

Native Kotlin screens for document capture, liveness and NFC. Add one dependency and call one method.

implementation("me.didit:didit-sdk:4.15.4")

Install

Install

Add the Didit Maven repository, then the dependency.

// settings.gradle.ktsdependencyResolutionManagement {    repositories {        google()        mavenCentral()        maven { url = uri("https://raw.githubusercontent.com/didit-protocol/sdk-android/main/repository") }    }}

Pick one artifact

ArtifactAutomatic captureNFCUse it when
Default me.didit:didit-sdk
Yes
Yes
You want every feature.
me.didit:didit-sdk-nfc
Yes
Yes
You want chip reading on top of the core.
me.didit:didit-sdk-core
Yes
No
You want the smallest build and no chip reading.

NFC means reading the chip in a passport or ID card with the phone. Gradle resolves every other dependency for you. Check the GitHub repo for the latest version.

Start

Start a verification

Initialize once, pass the session token from your server and handle three results.

Three results

CompletedThe user finished. session.status is APPROVED, PENDING or DECLINED.
CancelledThe user closed the flow.
FailedSomething went wrong. Show result.error.message.

Call DiditSdk.initialize(this) once, in your Application class. The SDK returns the status only. PENDING means In Review. The full decision reaches your server by webhook.

import me.didit.sdk.DiditSdkclass MyApp : Application() {    override fun onCreate() {        super.onCreate()        DiditSdk.initialize(this)    }}// AndroidManifest.xml// <application android:name=".MyApp" ...>

Requirements

What you need

Six things to check before you ship.

Android 6.0 and laterThat is API 23. Automatic capture needs API 24. On API 23 the user presses a shutter button.
Kotlin 1.9 and laterWorks in Kotlin, Jetpack Compose and Java apps. Compose comes with the SDK. Latest SDK version 4.15.4.
NFC includedThe default artifact reads passport and ID chips on phones with NFC.
A core artifact without NFCme.didit:didit-sdk-core is the smallest build. It has no chip reading.
Permissions are merged for youINTERNET, ACCESS_NETWORK_STATE, CAMERA and NFC. Camera and NFC are optional features, so the app installs on every device.
54 languagesThe SDK uses the device language, with English as the fallback.

Questions

Questions about the Android SDK

Which Android versions does the SDK support?
Android 6.0 (API 23) and later. Automatic document and face capture needs API 24. On API 23 the SDK falls back to manual capture with a shutter button.
Does the Android SDK read NFC chips?
Yes. The default artifact, me.didit:didit-sdk, reads passport and ID chips on phones with NFC. Use me.didit:didit-sdk-core for a smaller build with no chip reading.
Does my API key go in the app?
No. The key stays on your server. Your server creates the session and the app only gets the session token.
Does the SDK return the full result?
No. It returns the status. The full decision, with the document fields and the scores, reaches your server by webhook.
How do I install the Didit Android SDK?
Add the Didit Maven repository, https://raw.githubusercontent.com/didit-protocol/sdk-android/main/repository, to the repositories block in settings.gradle.kts, then add implementation("me.didit:didit-sdk:4.15.4") to your app's build.gradle.kts. Check the GitHub repository for the latest version. Also exclude META-INF/versions/9/OSGI-INF/MANIFEST.MF under packaging resources to avoid build conflicts, and call DiditSdk.initialize(this) in Application.onCreate().
Which Android permissions does the SDK add?
The Didit SDK declares INTERNET, ACCESS_NETWORK_STATE and CAMERA in its own AndroidManifest.xml, and NFC comes from didit-sdk-nfc, which the full bundle includes. They merge into your app's manifest automatically. Camera and NFC hardware are declared optional (android:required="false"), so your app still installs on devices without them and the SDK handles missing hardware at runtime.
Should I start the Android SDK with a workflow ID or a session token?
Use a session token in production. Your backend creates the session with the Create Verification Session API and passes its session_token to DiditSdk.startVerification(token = ...), which supports contact_details, expected_details, metadata and a per-session callback. The UniLink method, startVerification(workflowId = ...), needs no backend but is limited to vendorData.
Which errors can the Android SDK return?
A failed flow returns VerificationResult.Failed with a subclass of me.didit.sdk.VerificationError: SessionExpired, NetworkError, CameraAccessDenied, NotInitialized (call DiditSdk.initialize first), ApiError, RetryBlocked when the verification cannot be retried, or Unknown with a message. If the user leaves from the "No internet connection" screen, the result is Failed with NetworkError.
How do I keep the Android app download small?
Publish an Android App Bundle (AAB) so Google Play delivers only the device's own architecture, or restrict abiFilters if you ship a single APK. Enable R8 with isMinifyEnabled and isShrinkResources; the Didit SDK ships its own consumer rules. The detection models download at runtime, and me.didit:didit-sdk-core is the smallest artifact if you do not need chip reading.
Which Android SDK version supports biometric consent?
Android SDK 4.10.0 and later can show the biometric consent step that Didit asks for, before the first face capture, for people covered by Illinois, Texas or Colorado law. Earlier versions still run sessions, but the decision reports the consent as not collected with the reason BIOMETRIC_CONSENT_UNSUPPORTED_SDK. Upgrade if you verify people in those states.
Can I test the Android SDK without real users or charges?
Yes. Run sessions under a Didit sandbox application. Sandbox sessions are never billed, every external provider is mocked, and the outcome comes from the scenario or magic value you choose, not from the captured images. Active liveness still runs the real capture, including through the native SDKs' web handoff, and webhooks carry "environment": "sandbox".

Compliance built in

Audited, certified and attested.

We hold the certifications and build each country's rules into your flows, so you can launch anywhere without worrying. Security and Compliance center

  • Regulation encoded into your flows

    Tell us what you do and where. Didit lists the rules that apply to you, with sources, and builds the checks each country needs into one workflow.

  • Ready for AMLR

    Every requirement of the new EU anti-money laundering rules, from checking customers to human review, is already covered by a Didit check.

  • Trusted by EU regulators

    After a year of supervised testing, EU financial regulators confirmed that verifying with Didit is safer than checking an ID in person.

  • Audited, not self-declared

    iBeta Level 1 and Level 2. Liveness tested under ISO/IEC 30107-3.

Compliance assistant

Your obligations · 3 regions

EU · AMLRCustomer due diligence, human reviewCovered
Illinois, Texas, ColoradoExplicit biometric consentCovered
Germany · Youth protectionVerified adults only (JMStV)Covered
Workflow checked. Every obligation is met
  • SOC 2 Type 2
  • ISO 27001
  • iBeta Level 1 and Level 2
  • EU regulator attestation
  • FSM youth protection
  • GDPR
  • EBA remote onboarding
  • MiCA compatible
  • FIDO Alliance member
  • AMLREU AML Regulation ready

Integration · Didit MCP

Run Didit from your own AI agent

Connect Didit to Claude, Cursor, VS Code or ChatGPT and just ask in plain words. Your agent can do anything you can do in the console, with the same permissions you have.

Add to ClaudeChatGPT
Didit Academy · Lesson 04 · Use Didit with MCP
  • Build workflowsDescribe the checks you need. The agent creates and publishes the flow.
  • Run investigationsAsk why a session was declined, review cases, search people and companies.
  • Change rulesCreate payment rules, test them on past data and switch them on.
  • Pull reportsAsk for numbers, exports or the audit log.

Start

Add the dependency

Create an account, get your sandbox key and add the dependency in Gradle.

Create accountRead the docs

Free sandbox. Credit applies to work-email sign-ups.