Package: vouched-python
vouched-pythonInstall the wheel on Python 3:pipinstall--uservouched_pythonCreate update.envwith the following test environment values:VOUCHED_SERVER=https://verify.woollylabs.com/graphqlTEST_API_KEY_NO_PROD_DANGER=test_keyTEST_JOB_ID=<ID>API_KEY=api_keyJOB_ID=<ID>Run tests in the Python 3.7:pytestBuild PackageTo build python package , the wheel will be created in thedistfolder. Run:python setup.py sdist bdist_wheelQuick startHere's a very simple server using Vouched for Node.js for authenticationCreate the Vouched clientfromvouched.apiimportClientclient=Client(secret_app_key)ArgumentsParameterTypeRequiredDescriptionkeyString*Secret Application KeyReturnsParameterTypeRequiredDescriptionkeyString*Secret Application KeyErrorsInvalidRequestErrorUpdate client keycret_client_key=<SECRET>data=client.update_secret_client_key(secret_client_key=secret_client_key)ArgumentsParameterTypeRequiredDescriptionsecretClientKeyString*The secret key to be included in the header X-Api-Key of the webhook call.ReturnsParameterTypeRequiredDescriptionsecretClientKeyString*The updated secretClientKeyErrorsAuthenticationErrorConnectionErrorInvalidRequestErrorUnknownSystemErrorSubmit a verification jobfromvouched.utilsimportimage_to_base64user_photo_base64=image_to_base64('/opt/app/tests/data/selfie.png')id_photo_base64=image_to_base64('/opt/app/tests/data/id.jpg')job=client.submit(user_photo=user_photo_base64,id_photo=id_photo_base64,properties=[dict(name='internal_id',value='iid'),dict(name='internal_username',value='bob'),],type='id-verification',first_name='Janice',dob='06/22/1990',last_name='Way')ArgumentstypeString*Type of AI job ("id-verification")}callbackURLStringUpon the jobs completion, Vouched will POST the job results to the webhook. If the callbackURL is not given, Vouch will process the job in realtime.propertiesObjectArbitrary properties to add to the job, i.e. application ids. Described below.parametersObject*Object for id-verification. Described below.properties- arbitrary properties to add to the job, i.e. application idstypeString*Type of AI job ("id-verification")}nameStringName of the propertyvalueStringValue of the propertyparameters- object for id-verification.typeString*Type of AI job ("id-verification")userPhotoStringBufferidPhotoStringBuffer*idPhotoBackStringBuffer*firstNameString*The users first name.lastNameString*The users last name.dobString*Date in the format MM/DD/YYYY.ReturnsParameterTypeRequiredDescriptionjobJob*The newly created job.ErrorsAuthenticationErrorConnectionErrorInvalidRequestErrorUnknownSystemErrorRemove a jobjob=client.remove_job(id='USkjk33')ArgumentsParameterTypeRequiredDescriptionidString*ID of the job to remove.ReturnsParameterTypeRequiredDescriptionjobJob*The newly created job.ErrorsAuthenticationErrorConnectionErrorInvalidRequestErrorUnknownSystemErrorProvide results on jobsparams:=map[string]interface{}{"page":1,"sortBy":"date","sortOrder":"desc","from":"1990-12-24T04:44:00+00:00","to":"2020-12-24T04:44:00+00:00","type":"id-verification","token":"SESSION_TOKEN","status":"active","withPhotos":false,"pageSize":2,}ifresp,err:=c.Jobs(params);err!=nil{fmt.Printf("Error: %+v\n",err)}else{fmt.Printf("Jobs: %+v\n",resp)}jobs=client.jobs(page=1,page_size=2,type='id-verification',token=<TOKEN_FROM_WEB_CLIENT>,status='active',sort_by='date',sort_order='desc',with_photos=True,from_date='2017-01-24T04:44:00+00:00',to_date='2020-12-24T04:44:00+00:00')ArgumentsParameterTypeRequiredDescriptionidString*ID of the job to remove.typeStringType of job ("id-verification").ids[ID]Filter by a list of job IDs.pageStringPaginate list by page where the page starts at 1, defaults to 1.pageSizeStringThe number of items for a page, max 1000, defaults to 100.sortByStringSort the list from ("date", "status").sortOrderStringOrder the sort from ("asc", "desc").statusStringFilter by status from ("active","completed")toStringFilter by submitted to ISO8601 date.fromStringFilter by submitted from ISO8601 date.withPhotosBooleanDefaults to False. The returned job will contain detailed information idPhoto, idPhotoBack, and userPhoto.ReturnsParameterTypeRequiredDescriptionjobs[Job]*The removed job.totalPagesInt*Total number of pages of jobs.pageSizeInt*The requested page size.pageInt*The requested page.totalInt*Total number of filtered jobs.ErrorsAuthenticationErrorConnectionErrorInvalidRequestErrorUnknownSystemErrorTypesErrorsParameterTypeRequiredDescriptiontypeString*messageString*Type of job ("id-verification").suggestion[ID]A suggestion for matching name, John Smith, Jon Smith.errors[Error]InvalidRequestError contains a sub list of errorstypeInvalidRequestError- The request is invalid.FaceMatchError- Face match felled below the thresholdNameMatchError- Name match felled below the thresholdBirthDateMatchError- Birth date match felled below the thresholdInvalidIdPhotoError- The ID is invalidInvalidUserPhotoError- The user photo (selfie) is invalidUNAUTHENTICATED/AuthenticationError- The request could not be authenticatedConnectionError- A connection error occurred while communicating to the Vouched serviceInvalidIdBackPhotoError- The back of the ID is invalidUnknownSystemError- A unknown system error occurredInvalidIdError- The ID is invalidJobParameterTypeRequiredDescriptionidID*Job IDstatusString*Job status from ("active","completed")submittedStringISO8601 daterequestObjectObject for 'id-verification'.resultObjectObject of 'id-verification'.errors[Error]List of errors for unsuccessful completed jobs.requestParameterTypeRequiredDescriptiontypeString*Job typecallbackURLStringPOST enabled webhookparametersJobParameters*Object for 'id-verification'resultParameterTypeRequiredDescriptionsuccessBoolean*Did the id verification completed successfully?typeStringThe id typecallbackURLStringPOST enabled webhookstateStringThe issuing state of the id if applicablecountryStringThe issuing country of the ididStringThe verified id number of the idexpireDateStringThe verified expired date in the format MM/DD/YYYYbirthDateStringThe verified date in the format MM/DD/YYYYfirstNameStringThe user's verified first name.lastNameStringThe user's verified last nameconfidencesConfidencesConfidence scoresConfidencesParameterTypeRequiredDescriptionidFloat*Confidence score for an id photo, 0-1.0backIdFloat*Confidence score for the back of the id photo, 0-1.0selfieFloat*Confidence score for a selfie photo, 0-1.0idMatchFloat*Confidence score for matching data on the id, 0-1.0faceMatchFloat*Confidence score for matching faces, 0-1.0JobParametersParameterTypeRequiredDescriptionidPhotoString*The user's official identification photo in base64.userPhotoStringThe user's id comparison photo in base64.twicPhotoStringThe user's id twic id photo in base64.carInsurancePhotoStringThe user's id car insurance photo in base64.dotPhotoString*The user's id dot letter photo in base64.idPhotoBackStringThe user's official back of the identification photo in base64.dobStringDate in the format MM/DD/YYYY.firstNameStringThe user's first name.lastNameStringThe user's last name.