Skip to main content

Requirements

This guide covers SDK version 4.2.8. NFC chip reading needs 4.2.x or newer.

Install

Add the repositories in your settings file. A new Android Studio project already has google() and mavenCentral(); keep them. The SDK is hosted on cdn.getid.cloud, and JitPack is needed for one transitive dependency.
Then add the dependency to your app module:
The SDK ships its own ProGuard/R8 rules. You don’t need to add keep rules.

Permissions

The SDK merges CAMERA, INTERNET, ACCESS_NETWORK_STATE, ACCESS_WIFI_STATE and VIBRATE into your manifest, and asks the applicant for camera access when a camera step opens. Gallery upload uses the system photo picker, so no storage permission is needed. If the flow has a video recording step, add the microphone permission yourself:
AndroidManifest.xml
Without it, the video step fails with DENY_PERMISSION.

NFC

Only needed if the flow uses NFC. In AndroidManifest.xml:
AndroidManifest.xml
required="false" keeps the app installable on devices without NFC. No intent filters are needed: the SDK handles tag discovery while the flow is in the foreground. The NFC step is enabled per flow in the Backoffice: Flows → [flow name] → Customize → NFC. NFC needs a physical device.
  • If NFC is turned off, the SDK asks the applicant to turn it on in Settings and continues when they come back.
  • If the device has no NFC and the flow doesn’t require NFC, the step is skipped.
  • If the device has no NFC and the flow requires NFC, the flow ends with NO_NFC_SUPPORT.
See NFC chip reading.

Start the flow

Call startVerificationFlow from a user action, such as a button handler.
In Java, pass every argument in this order and use null for the ones you don’t need. Only one flow runs at a time. Calling startVerificationFlow again before the flow completes, is cancelled or fails does nothing.

Options

OptionTypeDescription
context requiredContextAn Activity or the application context
apiUrl requiredStringEnvironment URL, for example https://partner.sb.getid.dev or https://partner.getid.ee
auth requiredToken or KeyToken("JWT") with a session token from POST /sdk/v2/token. During development, Key("SDK_KEY") works instead; don’t ship the SDK key in production apps. Key also takes an optional customer ID: Key("SDK_KEY", "CUSTOMER_ID").
flowName requiredStringFlow name from the Backoffice
localeStringLanguage code, for example en, de or ar_SA. Overrides the device language. Unsupported languages fall back to the closest match, then English. See Localization for all codes.
dictionaryStringName of a custom translation dictionary. See Localization.
metadata.externalIdStringYour customer or session ID. Not unique.
metadata.labelsMap<String, String>Up to 30 string key-value pairs
profileDataMap<String, String>Known applicant data as key-value pairs, for cross-checking and prefilling. See Profile data keys.
address.countryStringExpected address for Proof of Address. ISO alpha-3. Required for the address to be used.
address.postcodeStringPostcode
address.addressLineStringStreet and house number, for example Harju 1. Required for the address to be used.
address.cityStringCity
acceptableDocumentsMap<String, List<DocumentEnum>>Narrows the flow’s accepted documents for this session. Maps ISO alpha-3 country codes to document types, with a "default" key. See Accepted documents.
eventListenerBroadcastReceiverListenerReceives the callbacks
Pass metadata as Metadata(externalId, labels) and address as Address(country, city, addressLine, postcode). Send the address as separate fields; the SDK doesn’t parse a single address line. If country or addressLine is missing, the SDK ignores the address and the applicant enters it on the Proof of Address step.

Profile data keys

profileData keys match field types in the flow, for example first-name. If the flow has a Profile Data step with a field of the same type, the value prefills that field and the applicant can edit it. The key must match the field type exactly. Values that don’t match a form field are still submitted with the application. The SDK formats these keys automatically: first-name, last-name, date-of-birth, gender, nationality, personal-number, document-number, date-of-issue, date-of-expiry, email, phone-number, address, postcode, city-of-residence, country-of-residence. Other keys, such as account-number, are passed as plain text. Dates are YYYY-MM-DD, gender is male or female, and countries are ISO alpha-3. Values longer than 256 characters are cut off.

Accepted documents

DocumentEnum values: PASSPORT, DOMESTIC_PASSPORT, DRIVING_LICENCE, ID_CARD, RESIDENCE_PERMIT, VOTER_CARD.
  • acceptableDocuments can only narrow what the flow accepts. It can’t add documents or countries that the flow doesn’t allow.
  • Countries not in the map use the "default" list. Without a "default" key, countries not in the map aren’t accepted.
  • An empty list excludes that country.
  • If nothing the flow allows remains after filtering, the SDK ignores acceptableDocuments and uses the flow’s list.

Callbacks

Implement BroadcastReceiverListener and pass it as eventListener.
CallbackReceivesCalled when
verificationFlowStart—The flow has started
verificationFlowCompleteGetIDApplication with applicationIdThe applicant has submitted everything
verificationFlowCancel—The applicant cancelled the flow
verificationFlowFailGetIDErrorThe flow can’t continue. See Errors.
Callbacks arrive on the main thread. The screen that started the flow may have been destroyed by then, so don’t assume its views still exist. The SDK doesn’t return verification results. Get them on your server by webhook or API.

Errors

verificationFlowFail receives one of these GetIDError values:
ErrorMeaningHow to recover
INVALID_KEYThe SDK key is invalid.Check the SDK key.
INVALID_TOKENThe JWT is empty or invalid.Generate a new JWT on your server.
TOKEN_EXPIREDThe JWT has expired.Generate a new JWT and start the flow again.
FLOW_NOT_FOUNDNo flow with this name exists in this environment.Check flowName and apiUrl.
UNSUPPORTED_SCHEMA_VERSIONThe flow configuration needs a newer SDK.Update the SDK.
FAILED_TO_RECEIVE_CONFIGURATIONThe flow configuration is incomplete, for example a liveness step without a liveness token.Check the flow in the Backoffice.
CUSTOMER_ID_ALREADY_EXISTAn application with this customer ID already exists.Use a different customer ID.
DENY_PERMISSIONThe applicant denied camera or microphone access, or the microphone permission is missing from the manifest.Ask the applicant to allow access in Settings, then start the flow again.
INVALID_LIVENESS_TOKENThe liveness session token was rejected.Start the flow again.
UNSUPPORTED_LIVENESS_VERSIONThe liveness service needs a newer SDK.Update the SDK.
NO_NFC_SUPPORTThe flow requires NFC and the device has no NFC.Ask the applicant to use a device with NFC.
FAILED_TO_SEND_APPLICATIONThe application couldn’t be submitted, usually because of the network.Check connectivity and start the flow again.
UNEXPECTED_ERRORAny other error.Start the flow again. If it keeps happening, contact support.

Full example

Kotlin