Skip to main content
The Android SDK opens the idto verification flow in its own screen and reports each result to a typed listener. It is a Kotlin library that Java apps use as is: every listener method has a default, so you override only the callbacks you need.
Mobile number verification screen with OTP entry

The mobile number step, with the one-time code field.

Requirements

You also need a client_id and client_secret (kept on your server), a workflowTemplateId, and a backend route that mints a client token. See Authentication.

Install

Add the JitPack repository in settings.gradle.kts:
Then add the dependency in app/build.gradle.kts:
Groovy:

Permissions

The library declares CAMERA and RECORD_AUDIO in its own manifest, so they merge into your app, and IDto.open requests any missing runtime permission before the flow starts. You add no manifest entries and call no permission API. The camera is used for documents and selfies, the microphone only for a liveness step. If the user has permanently denied the camera, the SDK offers a one-time dialog that opens Settings.

Quick start

1

Mint a client token on your server

Your server calls POST /auth/sdk/token with client_id and client_secret and returns only access_token to the app. Never ship the secret in the app. Recipes: Node, Java, Python.
2

Open the flow (Kotlin)

3

Or open it from Java

4

Confirm the result on your server

Listener callbacks drive your UI only. Confirm the session from your server with the session result recipe or a signed webhook before you grant access.
IDto.open(context, config, listener, tokenProvider) works from any Context. IDto.close() closes the flow and IDto.isOpen() tells you whether one is open. Only one flow runs at a time: a second open while one is active calls the new listener’s onError with step = "init" and error = "session_active" and opens nothing.
Selfie capture screen

The selfie step. The flow picks the front camera.

Token refresh

Pass an IDtoTokenProvider as the fourth argument to IDto.open. When the client token expires, the SDK calls getToken(callback); answer with callback.onToken(newToken) or callback.onError(throwable).

Configuration

IDtoConfig.Builder(clientToken, workflowTemplateId) takes these optional setters.

Callbacks

IDtoEventListener methods, all optional: onError with step = "init" comes from the SDK itself: session_active (a flow is already open), network_error (the flow did not load within readyTimeoutMs) or unknown_error (the WebView stopped). Other error values are readable messages to log, not to match on.

See it run

Was this page helpful? Email us at tech@idto.ai with the page link.
Last modified on October 4, 2026