NAV Navbar
  • /auth/token
  • /session/<id>/verifai-result
  • /session/<id>
  • /auth/token

    import requests
    
    
    allowed_documents = ["P", "I"]
    handover_url = "<HANDOVER_URL>"
    
    backend_token = "<BACKEND_TOKEN>"
    endpoint = f'{WEB_SDK_URL}/v1/auth/token'
    
    
    data = {
        "document_type_whitelist": allowed_documents,
        "handover_base_url": handover_url,
        "locale": "en_US"
    }
    headers = {
        'Authorization': f'Bearer {backend_token}',
    }
    
    response = requests.post(endpoint, json=data, headers=headers)
    

    Supplies a One Time Password (OTP) for initializing the Frontend

    Endpoint Method Body
    v1/auth/token POST json

    Headers

    Header Value
    Authorization Bearer <BACKEND-TOKEN>

    Body

    Key Type Example
    document_type_whitelist array * ["P", "I"]
    country_choices_whitelist array ["NL", "DE"]
    country_choices_blacklist array ["BE", "AU"]
    handover_base_url str * "https://<YOUR_SITE>/handover"
    allow_edit_privacy_filters bool true
    locale str "en_US"
    enable_viz bool true
    enable_facematch bool false
    cors_allowed_origin str "https://your-website.com"

    Document type whitelist

    The document_type_whitelist accepts the following values:

    Value
    Document
    P Passport
    I Identity Card
    D Drivers license
    RP Residence Permit
    R Refugee travel document

    Country lists

    The country_choices_whitelist and country_choices_blacklist accept all official two letter country codes from the following list: ISO 3166-1 alpha-2

    Handover URL

    The base url to the handover page.

    Example could be: https://<YOUR_SITE>/handover

    Make sure this page is available and serves the handover js

    More info on the handover:

    Supported locales:

    Name Code Flag
    English (American) "en_US" πŸ‡ΊπŸ‡Έ
    English (British) "en_GB" πŸ‡¬πŸ‡§
    German "de_DE" πŸ‡©πŸ‡ͺ
    Dutch "nl_NL" πŸ‡³πŸ‡±

    CORS Allowed Origin

    If needed, it is possible to instruct the API to set the Access-Control-Allow-Origin response header to a custom origin.

    The custom allowed origin will be used for the entire user session.

    By default, the response header is set as Access-Control-Allow-Origin: *, allowing all origins.

    (BETA) Reading from the Visual Inspection Zone (VIZ):

    Indicate whether or not the text from the VIZ should be read.

    If enable_viz is set to true, the Verifai Result object will contain a vizData object consisting of a set of key - value pairs, corresponding to the zone types on the document and their content. The complete list of possible zone keys can be found here.

    Note that this feature is still in the beta stage:

    (BETA) Face Matching Feature:

    Indicate whether the end-user should be asked to make a selfie which would be matched against their id-document picture.

    If enable_facematch is set to true, the Verifai Result object will contain a faceMatchData object consisting of two fields:

    Note that this feature is still in the beta stage:

    Response

    {
        "token": "1234567890",
        "expire": "05/29/2017 09:30:12 PM",
        "used": true
    }
    
    HTTP Code data type
    201 json

    Response Data

    Key Type
    token str
    expire str
    used bool

    /session/<id>/verifai-result

    import requests
    
    session_id = "<SESSION_ID_FROM_FRONTEND>"
    internal_token = "<BACKEND_TOKEN>"
    
    endpoint = f'{WEB_SDK_URL}/v1/session/{session_id}/verifai-result'
    
    headers = {
        'Authorization': f'Bearer {internal_token}'
    }
    
    response = requests.get(endpoint, headers=headers)
    

    Gets the Verifai Result object after the flow is done.

    Endpoint Method Body
    v1/session/<session_id>/verifai-result?image_result= GET -

    Parameters

    Query Parameters

    Headers

    Header Value
    Authorization Bearer <BACKEND-TOKEN>

    Response

    HTTP Code data type
    200 json

    Response Data

    Key Type Description Link
    backImage str Base64 encoded (jpeg) -
    frontImage str Base64 encoded (jpeg) -
    faceImage str Base64 encoded (jpeg) -
    idModel object ID Model object IDModel
    mrzData object Mrz Data object MRZ
    barcodes array Barcode objects Barcode
    vizData object VIZ Data object VIZ
    faceMatchData object FaceMatch Data object FaceMatch

    Follow this link for the latest documentation on the Verifai result:

    Verifai Result Documentation

    /session/<id>

    import requests
    
    session_id = "<SESSION_ID_FROM_FRONTEND>"
    internal_token = "<BACKEND_TOKEN>"
    
    endpoint = f'{WEB_SDK_URL}/v1/session/{session_id}'
    
    headers = {
        'Authorization': f'Bearer {internal_token}'
    }
    
    response = requests.delete(endpoint, headers=headers)
    

    Deletes a Session

    Endpoint Method Body
    v1/session/<session_id> DELETE json

    Parameters

    Headers

    Header Value
    Authorization Bearer <BACKEND-TOKEN>

    Response

    HTTP Code data type
    200 -