User Id Validation & Partner Params


SIDMetada is an object used to send two different kinds of metadata the first one being the User id information and partner parameters which can be associated with jobs to instantiate the metadata object you do the below

SIDMetadata metadata = new SIDMetadata();

//To get the user id information
 SIDUserIdInfo userIdInfo = metadata.getSidUserIdInfo();
//To get the partner parameters
PartnerParams params  = metadata.getPartnerParams();

Below are the use case for the metadata and association with job

User Id Validation

ID card data can be set using SIDUserIdInfo object. It uses a declarative mechanism. Setting ID card infos, this should be set prior to start ID card capture.

Step 1: Create the use SIDUserIdInfo object which is a child object of SIDMetadata

 SIDMetadata metadata = new SIDMetadata();
 SIDUserIdInfo userIdInfo = metadata.getSidUserIdInfo();

Step 2 : Once the SIDUserIdInfo is available there are a couple of methods which can be called to set the user info as required

//For setting first name
//For setting last name
//For setting middle name
//For setting country
//For setting id type
//For setting id number
//For setting email

Step 3: For any optional or extra information that may be associated with the userIdInfo there is a method which can be used to add or remove additional information

//add additional information

//remove additional information


Step 4: Set the metadata object to the job's config

//Instantiate the SIDConfig builder and set the metadata
SIDConfig.Builder sidConfig = new SIDConfig.Builder(this)

Step 5: Submit the job

//Instantiate SIDNetworkRequest object to send 
SIDNetworkRequest mSINetworkrequest = new SIDNetworkRequest(this);
//submit the job

Modify Partner Parameters

Partner Parameters allow you to add any additional information that you would like associated with the job. This information will come back as a JSON object in results send from the Smile Identity server. A common use case for this is to add your own unique ID to track the job as it relates to a user/instance in your own system. All fields in the partner_params must be Strings.

To modify or add additional data to the PartnerParams JSON (see Partner Parameters)

First you need to get an instance of PartnerParams from the SIDMetadata class.

 SIDMetadata metadata = new SIDMetadata();
 PartnerParams params  = metadata.getPartnerParams();

2) You can call these methods to add predefined partner params data.

//set the user id
params.setUserId("your user if");

//set the enrolled job id
params.setEnrolledJobId("job id");

//set the job type
params.setJobType(int jobType);

IMPORTANT for >=v6.4.1

The SDK will provide validation by default and will return an error which can be either


�For more information on required fields per ID type please refer to

You can turn off this remote validation by using

builder = new SIDConfig.Builder(this)
//this will only validate to make sure there is a country, id type and id number

3) To add additional values other than those predefined to the entry (the method can be chained)

//set additional value key pair

4) To remove an additional value (For instance the key named name4) use:

//remove additional 

Step 4: Set the metadata object to the job's config

//Instantiate the SIDConfig builder and set the metadata
SIDConfig.Builder sidConfig = new SIDConfig.Builder(this)

Step 5: Submit the job

//Instantiate SIDNetworkRequest object to send 
SIDNetworkRequest mSINetworkrequest = new SIDNetworkRequest(this);
//submit the job


A tag defines a name for a container, where selfies, ID card and other data will be saved on your phone. The tag and associated container can be accessed at any time as long as it's not deleted by the user or the content of the container referenced by the tag is not yet uploaded to the server. It is important to note that tags should be used to identify a unique job. Reuse of a single tag for multiple jobs will cause you to lose data and may have negative side effects.

Tags are set during Selfie capture, ID card capture, and when building submit Configuration.

During selfie capture, when calling captureSelfie method. If the container referenced by the tag already has existing selfies, they will be updated.

During ID card capture, the tag is set in the constructor, if an ID card already exists in the container referenced by the tag, it will be updated

When building submit configuration, the tag is set in SIDConfig build method. This will tell the SDK the container you want to upload to the server. Building the config saves or updates the state of the defined Job in memory. It's kept in memory until the user deletes the tag, or selfies have been successfully uploaded to the server. On successful upload, the library deletes the tag and associated container from memory.

Deleting a tag sidConfig.removeTag(String tag); returns a boolean if the removal is successful

Return all saved tags sidConfig.getTags(); results returns as set

Deleting all tags will remove all tags and associated data, cannot be reversed

Setting the Job Type

The job type is set in the SIDConfig builderExample:Build an SIDConfig for Authentication with 258 jobType to force rejection if a possible spoof is detectedThen call the SIDNetworkRequest submit method to upload to server : SIDNetworkRequest.submit(config Find more on job types here

Geolocation Data

The geolocation info is fetched app side using google awareness api and the result sent to the library. Before starting a selfie capture, call SIDGeoInfos.getInstance().init(Context);

This will initialize and fetch user location.

The geo info requires ACCESS_FINE_LOCATION permission to be granted by the user. Set user location User location is set in the SID Config file.Get Geo Information:

The class SIDGeoInfos contains the logic to fetch the location.

Re-use Enrollment Id's

If you have the enrolled Job Id and User Id you can reuse those values for authentication.

partnerData is the partner data source

thisUser is an index into partnerData that points to the user being enrolled or authenticated

Re-enroll a User

The SmartSelfie™ demo has 2 buttons to demonstrate re-enroll.

To re-enroll a user, set the enroll User ID in PartnerParams before submitting SIDConfig object.

1) Get a PartnerParams instance and set the enroll User Id

2) Build SIDConfig after setting the enroll User Id

3) Submit configuration

Accessing your Results

Once you’ve completed a job, you’ll received your results. Do view these results and the details around them, please login to your portal.

1. Visit the following URL:

Login using your unique partner credentials and you will be taken to your partner portal

2. Click the “Live Results” option to be taken to a list of your most recent jobs.

3. From here, you will be able to identify your job using your Job ID. You can get your Job ID from the `onEnrolled` or `onAuthenticated` methods in your Android app or from the Callback to your server.

If the Job can’t be found, you can search using the Job ID from the app


To authenticate requests provide a signature and timestamp as documented in the API Access section of the documentation.

To request review images, make a get request with the String value of your partner_id, and the job_id (string). The partner_id can be found in the documentation section, and the job_id is provided in both the return from a call to job_status, and the body of the callback sent to your server. You'll notice in the documentation there are two versions of partner_id, a String version and an Integer version. The String version is a 3 digit string for example partner_id 1 has a String Value "001". Also note that the job_id we are talking about here is not the Smile ID job id we set, it is the job id generated by your system when creating the ID Validation request (uuid).

The review_id in the url is the id returned in the request to obtain the review images. The email field should correspond to the email of a Smile Identity account associated with your company.

For a update_image review, the only judgement required is whether to accept the photo or not. Therefore the review portion only requires the ‘accept’ field to be filled with a boolean indicating whether or not to accept the new image.

The user api is capable of changing the state of your enrolled users in 3 ways. The first is to allow re-enrollment. Setting allow_re_enroll to true will allow your user to update their selfie and other information on file. Setting it to false would prevent that ability. The second is to toggle the active status of a user. Setting active to true would allow your user to perform actions such as authenticate, and is the default status once a user has been enrolled. While in a de-activated state, your user would be unable to perform actions using Smile Identity, such as perform an authentication. The third is to delete a user from the smile identity system. Deletion cannot be undone. The api will allow you to toggle the values for re-enrollment and active status.

Last updated