Authenteq API Documentation
  • Introduction
  • Create an Account
  • Documentation
    • Change Log
      • Mobile SDK
      • Web and API
    • Migration Guides
      • Mobile SDK 1.63 & WebIDV
      • Multi-Document Flow
    • Version Support
  • Mobile SDK
    • iOS
      • iOS Requirements
      • Installation
      • Identification
        • Identification Result
        • Document Identification Result
      • Face Authentication
      • Errors
      • Customization
    • Android
      • Android Requirements
      • Installation
      • Identification
        • Identification Result
        • Document Identification Result
      • Face Authentication
      • Customization
    • React Native
      • iOS
      • Android
    • Flutter
      • iOS
      • Android
    • Authentication Token
    • UI Customization
    • Examples
  • Web
    • Web Overview
    • Getting Started
    • How to Integrate Web?
    • Examples
    • API Reference
  • Export
    • Export Overview
    • API Reference
  • Webhook
    • Webhook Overview
  • AML
    • AML Overview
    • API Reference
  • Verification Links
    • Verification Links Overview
  • Recognition
    • Recognition Overview
    • API Reference
Powered by GitBook
On this page
  • Steps
  • 1) Get your Client Details
  • 2) Create the "Sign Up with Authenteq" Button
  • 3) Get Verification Result Details

Was this helpful?

  1. Web

How to Integrate Web?

PreviousGetting StartedNextExamples

Last updated 3 years ago

Was this helpful?

Steps

Confirming a user's identity with Authenteq Web IDV is fairly simple. You can integrate our solution into your system with three basic steps.

1) Get your Client Details

Once you , we will create a client account for your system. You will get from us:

  • Client ID - your client identifier.

  • Client Secret - your secret key.

You need them to authorize your requests.

Use the to set:

  • Redirect URL - a URL that your user is redirected to on successful identity verification.

You can specify multiple redirect URLs in case you have multiple deployment environments and should provide one of them on request the identity verification session and the result details retrieval.

You may use parameters in your redirect URL like ?id=14567678&email=user@business.com. Please avoid use of thecodeone, as before redirect we add it with the granted code in its value.

2) Create the "Sign Up with Authenteq" Button

To initialize the identity process, request the verification session by performing a GET request to:

https://api.app.authenteq.com/web-idv/verification-url?redirectUrl=<redirectUrl>

Where <redirectUrl> should be replaced with one of your redirect URLs corresponding to your current deployment environment.

To authorize the request, combine your client ID and secret with a colon separator, encode in base64 and add to the Authorization header like so:

Authorization: Basic base64(<clientId>:<clientSecret>)

To issue request, you can use one of the snippets in your target language, just replace <client_id>, <client_secret> and <redirect_url> with proper values:

import requests

url = 'https://api.app.authenteq.com/web-idv/verification-url?redirectUrl=<redirect_url>'

headers = {
  'Content-Type': 'application/x-www-form-urlencoded',
}

auth = requests.auth.HTTPBasicAuth('<client_id>', '<client_secret>')

response = requests.request('GET', url, headers=headers, auth=auth)

print(response.text.encode('utf8'))
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;
import okhttp3.Credentials;

OkHttpClient client = new OkHttpClient().newBuilder().build();

String credential = Credentials.basic("<client_id>", "<client_secret>");
  
Request request = new Request.Builder()
  .url("https://api.app.authenteq.com/web-idv/verification-url?redirectUrl=<redirect_url>")
  .method("GET", null)
  .addHeader("Content-Type", "application/x-www-form-urlencoded")
  .addHeader("Authorization", credential)
  .build();
Response response = client.newCall(request).execute();
var axios = require('axios');

var config = {
  method: 'get',
  url: 'https://api.app.authenteq.com/web-idv/verification-url?redirectUrl=<redirect_url>',
  headers: { 
    'Content-Type': 'application/x-www-form-urlencoded',
  },
  auth: {
    username: '<client_id>',
    password: '<client_secret>',
  }
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.app.authenteq.com/web-idv/verification-url?redirectUrl=<redirect_url>",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_USERPWD => "<client_id>:<client_secret>",
  CURLOPT_HTTPHEADER => array(
    "Content-Type: application/x-www-form-urlencoded"
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
package main

import (
  "fmt"
  "strings"
  "net/http"
  "io/ioutil"
)

func main() {

  url := "https://api.app.authenteq.com/web-idv/verification-url?redirectUrl=<redirect_url>"
	method := "GET"

	payload := strings.NewReader("")

	client := &http.Client {
	}
	req, err := http.NewRequest(method, url, payload)

	if err != nil {
		fmt.Println(err)
	}
	req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
	req.Header.Add("Authorization","Basic " + basicAuth("<client_id>","<client_secret"))

	res, err := client.Do(req)
	defer res.Body.Close()
	body, err := ioutil.ReadAll(res.Body)

	fmt.Println(string(body))
}
require "uri"
require "net/http"

url = URI("https://api.app.authenteq.com/web-idv/verification-url?redirectUrl=<redirect_url>")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Get.new(url)
request.basic_auth("<client_id>", "<client_password>")
request["Content-Type"] = "application/x-www-form-urlencoded"


response = https.request(request)
puts response.read_body
using System;
using RestSharp.Authenticators;
using RestSharp;

var client = new RestClient("https://api.app.authenteq.com/web-idv/verification-url?redirectUrl=<redirect_url>");
client.Authenticator = new HttpBasicAuthenticator("<client_id>", "<client_secret>");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Content-Type", "application/x-www-form-urlencoded");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);

In response you will receive a verification URL that leads to Authenteq Identity Server. By following the URL, the user will begin the identity process:

  • ID scan

  • liveness check

  • identity verification - where we verify that the person who performed the liveness test is the document holder.

To inform the user that their identity will be verified using an external service you could use our button:

Here are the HTML and CSS for the button:

<a class="AuthenteqButton" href="<verificationUrl>">
    <img class="AuthenteqButton-logo" src="authenteq-logo.png" alt="Authenteq Logo" />
    <div class="AuthenteqButton-caption">Sign Up with Authenteq</div>
</a>
.AuthenteqButton,
.AuthenteqButton:hover,
.AuthenteqButton:active {
  margin: 0 auto;
  display: block;
  position: relative;

  height: 48.59px;
  width: 286px;
  border-radius: 28px;
  background-color: #F29E2E;
  box-shadow: 0 5px 10px -5px rgba(0,0,0,0.2);

  color: #FFFFFF;
  font-family: Roboto;
  font-size: 15px;
  line-height: 18px;
  text-align: center;
}

.AuthenteqButton-logo {
  display: block;
  width: 30px;
  height: 30px;
  position: absolute;
  top: 9px;
  left: 16px;
}

.AuthenteqButton-caption {
  position: absolute;
  top: 9px;
  left: 62px;

  height: 30px;
  width: 224px;
  color: #FFFFFF;
  font-family: Roboto;
  font-size: 15px;
  line-height: 30px;
  font-weight: 100;
  text-align: center;
  border-left: 1px solid #FFFFFF;
}

Please use this file to display our logo:

3) Get Verification Result Details

When the identify verification process is complete, we will redirect the user to the redirect URL and add the code parameter that you will use to retrieve the verification result details.

If the user interrupts or fails the verification the code will not be present on the redirect URL. The endpoint you provide as the redirect URL must handle that case. If the code is missing we recommend redirecting the user to the beginning of the flow.

To get the verification result details, perform a GET request to:

https://api.app.authenteq.com/web-idv/verification-result?redirectUrl=<redirectUrl>&code=<code>

Where <redirectUrl> should be replaced with the same URL you used to request the verification session and <code> with one you got on redirect earlier.

To authorize the request, combine your client ID and secret with a colon separator, encode in base64 and add to the Authorization header like so:

Authorization: Basic base64(<clientId>:<clientSecret>)

The endpoint will return the user details:

To retrieve details you can use one of the snippets we prepared for you, just replace <client_id>, <client_secret> , <redirect_url> and <code> with proper values:

import requests

url = "https://api.app.authenteq.com/web-idv/verification-result?code=<code>&redirectUrl=<redirect_url>"

auth = requests.auth.HTTPBasicAuth('<client_id>', '<client_secret>')

response = requests.request('GET', url, auth=auth)

print(response.text.encode('utf8'))
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;
import okhttp3.Credentials;

OkHttpClient client = new OkHttpClient().newBuilder().build();

String credential = Credentials.basic("<client_id>", "<client_secret>");
  
Request request = new Request.Builder()
  .url("https://api.app.authenteq.com/web-idv/verification-result?code=<code>&redirectUrl=<redirect_url>")
  .method("GET", null)
  .addHeader("Authorization", credential)
  .build();
Response response = client.newCall(request).execute();
var axios = require('axios');

var config = {
  method: 'get',
  url: 'https://api.app.authenteq.com/web-idv/verification-result?code=<code>&redirectUrl=<redirect_url>',
  auth: {
    username: '<client_id>',
    password: '<client_secret>',
  }
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.app.authenteq.com/web-idv/verification-result?code=<code>&redirectUrl=<redirect_url>",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_USERPWD => "<client_id>:<client_secret>",
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {

  url := "https://api.app.authenteq.com/web-idv/verification-result?code=<code>&redirectUrl=<redirect_url>"
  method := "GET"

  client := &http.Client {
  }
  req, err := http.NewRequest(method, url, nil)
  
  req.SetBasicAuth("<client_id>", "<client_secret>")

  if err != nil {
    fmt.Println(err)
  }

  res, err := client.Do(req)
  defer res.Body.Close()
  body, err := ioutil.ReadAll(res.Body)

  fmt.Println(string(body))
}
require "uri"
require "net/http"

url = URI("https://api.app.authenteq.com/web-idv/verification-result?code=<code>&redirectUrl=<redirect_url>")

https = Net::HTTP.new(url.host, url.port);
https.use_ssl = true

request = Net::HTTP::Get.new(url)
request.basic_auth("<client_id>", "<client_password>")
request["Authorization"] = "Basic bzdNNzFuWlY2a0ZFUHdpaWd4TXk6MURmSTh2bzBJVEFYcFYxRDJyN3d5WXByNGU5dXJIckgyZmdkT2RNNQ=="

response = https.request(request)
puts response.read_body
var client = new RestClient("https://api.app.authenteq.com/web-idv/verification-result?code=<code>&redirectUrl=<redirect_url>");
client.Authenticator = new HttpBasicAuthenticator("<client_id>", "<client_secret>")
client.Timeout = -1;
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);

The endpoint will return the user details:

{
  "id": "3631324b-5bcc-48b0-b717-4f12f45e0a1d",
  "status": "PASSED",
  "platform": "WEB",
  "startTime": "2020-04-10T11:44:40Z",
  "endTime": "2020-04-10T11:47:23Z",
  "livenessFaceImage": {
    "contentType": "image/jpeg",
    "content": "bGl2ZW5lc3NGYWNlSW1hZ2UK"
  },
  "documentData": {
    "documentType": "DL",
    "documentNumber": "1234567890",
    "issuingCountry": "USA",
    "jurisdiction": "UTA",
    "nationality": "USA",
    "surnameAndGivenNames": "DOE JOHN",
    "surname": "DOE",
    "givenNames": "JOHN",
    "nameSuffixes": "MR",
    "namePrefixes": "JR",
    "sex": "M",
    "dateOfBirth": "1964-12-30",
    "dateOfExpiry": "2022-12-30",
    "dateOfIssue": "2012-05-30",
    "address": "430-985 ELEIFEND^DULUTH WA 92611",
    "licenseClass": "B/C/D",
    "licenseClassDetails": {
      "B": {
        "from": "2019-01-30",
        "to": "2029-01-30",
        "notes": "Some valuable note"
      },
      "C": {
        "from": "2019-01-30",
        "to": "2029-01-30"
      },
      "D": {
        "from": "2019-01-30",
        "to": "2029-01-30"
      }
    },
    "croppedFrontImage": {
      "contentType": "image/jpeg",
      "content": "Y3JvcHBlZEZyb250SW1hZ2U="
    },
    "croppedBackImage": {
      "contentType": "image/jpeg",
      "content": "Y3JvcHBlZEJhY2tJbWFnZQ=="
    },
    "faceImage": {
       "contentType": "image/jpeg",
       "content": "ZmFjZUltYWdlCg=="
    }
  },
  "nfcVerified": false
}
sign up
Customer Dashboard
4KB
authenteq-logo.png
image
Authenteq Logo
Sign Up with Authenteq button.