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 hasgoogle() and mavenCentral(); keep them. The SDK is hosted on cdn.getid.cloud, and JitPack is needed for one transitive dependency.
Permissions
The SDK mergesCAMERA, 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
DENY_PERMISSION.
NFC
Only needed if the flow uses NFC. InAndroidManifest.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.
Start the flow
CallstartVerificationFlow from a user action, such as a button handler.
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
| Option | Type | Description |
|---|---|---|
context required | Context | An Activity or the application context |
apiUrl required | String | Environment URL, for example https://partner.sb.getid.dev or https://partner.getid.ee |
auth required | Token or Key | Token("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 required | String | Flow name from the Backoffice |
locale | String | Language 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. |
dictionary | String | Name of a custom translation dictionary. See Localization. |
metadata.externalId | String | Your customer or session ID. Not unique. |
metadata.labels | Map<String, String> | Up to 30 string key-value pairs |
profileData | Map<String, String> | Known applicant data as key-value pairs, for cross-checking and prefilling. See Profile data keys. |
address.country | String | Expected address for Proof of Address. ISO alpha-3. Required for the address to be used. |
address.postcode | String | Postcode |
address.addressLine | String | Street and house number, for example Harju 1. Required for the address to be used. |
address.city | String | City |
acceptableDocuments | Map<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. |
eventListener | BroadcastReceiverListener | Receives the callbacks |
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.
acceptableDocumentscan 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
acceptableDocumentsand uses the flow’s list.
Callbacks
ImplementBroadcastReceiverListener and pass it as eventListener.
| Callback | Receives | Called when |
|---|---|---|
verificationFlowStart | — | The flow has started |
verificationFlowComplete | GetIDApplication with applicationId | The applicant has submitted everything |
verificationFlowCancel | — | The applicant cancelled the flow |
verificationFlowFail | GetIDError | The flow can’t continue. See Errors. |
Errors
verificationFlowFail receives one of these GetIDError values:
| Error | Meaning | How to recover |
|---|---|---|
INVALID_KEY | The SDK key is invalid. | Check the SDK key. |
INVALID_TOKEN | The JWT is empty or invalid. | Generate a new JWT on your server. |
TOKEN_EXPIRED | The JWT has expired. | Generate a new JWT and start the flow again. |
FLOW_NOT_FOUND | No flow with this name exists in this environment. | Check flowName and apiUrl. |
UNSUPPORTED_SCHEMA_VERSION | The flow configuration needs a newer SDK. | Update the SDK. |
FAILED_TO_RECEIVE_CONFIGURATION | The flow configuration is incomplete, for example a liveness step without a liveness token. | Check the flow in the Backoffice. |
CUSTOMER_ID_ALREADY_EXIST | An application with this customer ID already exists. | Use a different customer ID. |
DENY_PERMISSION | The 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_TOKEN | The liveness session token was rejected. | Start the flow again. |
UNSUPPORTED_LIVENESS_VERSION | The liveness service needs a newer SDK. | Update the SDK. |
NO_NFC_SUPPORT | The flow requires NFC and the device has no NFC. | Ask the applicant to use a device with NFC. |
FAILED_TO_SEND_APPLICATION | The application couldn’t be submitted, usually because of the network. | Check connectivity and start the flow again. |
UNEXPECTED_ERROR | Any other error. | Start the flow again. If it keeps happening, contact support. |
Full example
Kotlin