Non-Native Apps

WebView Flow Overview

  1. Get a verification URL for a user from AiPrise, load it in the WebView.
  2. Once the verification is completed in the WebView, it will redirect to a URI of your choice.
  3. Query the verification results.

Getting the URL

For the user verification, you will first have to request a verification URL from AiPrise. Your WebView is then going to load this URL.

Use the Get User Verification URL API to get the URL. In the request, you send us the template_id (provided to you by AiPrise) and a redirect_uri to which the WebView will redirect after the verification is complete. You can also optionally send any user data like name, date of birth etc. that you want to verify.

Following shows a sample cURL request to get the Verification URL. More here.

curl --request POST \
     --url https://api-sandbox.aiprise.com/api/v1/verify/get_user_verification_url \
     --header 'Accept: application/json' \
     --header 'Content-Type: application/json' \
     --header 'X-API-KEY: <YOUR_API_KEY>' \
     --data '
{
     "redirect_uri": "https://somecompany.com",
     "template_id": "cc82dfa0-6134-4b8a-b6ea-19d9ad8704ac",
     "user_data": { // Optional
          "first_name": "Steven",
          "middle_name": "Paul",
          "last_name": "Jobs"
     },
     "additional_info": { // Optional
        ..
     },
     "theme_options": { // Optional
        ..
     }
}
'

NOTE: The verification URL is only active for 24 hours.

Sample Response:

{
    "message": "success",
    "verification_url": "https://verify-sandbox.aiprise.com/?verification_session_id=4dec3ec0-4214-4fe3-9a33-64bd176dd355"
}

Redirection

Once the verification is completed from AiPrise, we will redirect it to the redirect_uri you sent us and add the verification session id to its query parameter.

SAMPLE REDIRECTION URI: https://somecompany.com/?verification_session_id=4dec3ec0-4214-4fe3-9a33-64bd176dd355

Getting Verification Results

You can then get the verification results using [Get User Verification Result] (https://aiprise.readme.io/reference/get-user-verification-result)

Following shows a sample cURL request to get the verification result.

curl --request GET \
     --url https://api-sandbox.aiprise.com/api/v1/verify/get_user_verification_result/4dec3ec0-4214-4fe3-9a33-64bd176dd355 \
     --header 'Accept: application/json' \
     --header 'X-API-KEY: <YOUR_API_KEY>'