Web

The manual assumes the integrating company has a web server running at example.com and has a company_key. The company_key is the access key for communicating from the company server to the api4all.io server (widget.api4al.io).

The company server now has to redirect the user's browser to the following location:

<https://widget.api4all.io/?session_token={session_token_here}>


The company may also embed it in an iframe like this:

<iframe
    src="https://widget.api4all.io/?session_token={session_token_here}"
    allow="camera">
</iframe>

After finishing the identification process the user's browser is redirected back to the return URL as specified in the flags but with an added session_token parameter. In the case of embedding in an iframe the end of the process can be detected using JavaScript like this:

addEventListener('message', function (e) {  
    if (e.origin !== '<https://widget.api4all.io'>) return  
    if (e.data !== 'DONE') return  
    // process done, check for result here  
})