Job Submission
The job submission method is the method that sends the information to the Smile ID servers for processing and returns results when done. To improve UX there are event based callbacks during this.
Import the library
Submit the Job
tag => required and if this is job type which involve a selfie it must have been a tag that has already captured a job before this method is called.
jobType => required and must be a valid job type as listed on the products page on the left
isProduction => required and is a boolean true or false. If false the jobs will be sent to sandbox if true jobs will be sent to production
partnerParams => (optional) a javascript object as below. This object can have a user_id and or a jobid all of which if not passed will be autogenerated. It can also take other parameters which you may need back to identify the job as long are not with the reserved keys job_id,user_id,job_type
idInfo => (optional) This is mandatory for document verification but is used as the case may be for job type Enhanced KYC + SmartSelfie. the object is described below
geoInfo => (optional) This is optional and is used if you need to record geo location information associated with the job
callBackUrl => (optional) this will set the url to send the call back results to, for more information on the call back url please read here
jobStatusPollingTimeoutMillis => (optional) pass 0 if not needed. This will be the time to wait for job status polling , note if set to a smaller number this will return a complete false result from job status and results will be delivered to the callback
Events
During the processing of the job the SDK provides different events to signify the stage where the job is currently at
The SIDReactNativeEventEmitter is the object that provides these events and is accessible via the following steps
�Import the NativeModules Component
Setup the emitter
Listen to the Upload Event
This will return a integer wrapped in a string signifying how much of the zip file has been uploaded in a percentage which is relative to the file size
Listen to the Completion Event
This will return a status "done" when the upload is finished
Get Results
The method will return a result accessible in our example as result.result.
This object is an object documented in the return value section of your chosen product type under the products section on the left the most important of these being the result.ResultCode which shows the state and result from the job you have just run
�
�
Last updated