# app

Endpoints to initiate a call on LiveID+

## service-asyncall

 - [GET /app/service-asyncall](https://docs.namirial.app/products/liveidplus/2.1-test/enterprise/developer-documentation/api-definition/app/serviceasyncall.md): In addition to perform a "synchronous" call (the customer calls and is immediately redirected to platform test, then to the first available operator) it's also possible to perform an "asynchronous" call: the customer provides his data and then requests a video identification, which will be managed in another moment by operator (eg: calendar management). To do this LiveID+ platform provides two methods: pushAsyncCall and service-asyncall.

service-asyncall method retrieves the loaded call using pushAsyncCall and then start the video identification (redirects to platform test, then to the first available or requested operator).

Please note: calls to "service-asyncall" will automatically redirect caller to LiveID + platform test so it can be provided as a link directly to the customer (eg: confirmation email of the appointment generated by the operator).

## service-start

 - [POST /app/service-start](https://docs.namirial.app/products/liveidplus/2.1-test/enterprise/developer-documentation/api-definition/app/servicestart.md): Start the process for a video identification. It can be a live session with an operator or a self process, or a combination of both (in this case, a selection method should be discussed in advance with Namirial).\
At the end of the process, or in case of errors, the page will be redirected to the redirectUrl (if specified) passing a LiveIDPlusResult POST parameter, containing the JSON result message in the same format specified in the Call closing section.

There are two ways to integrate LiveID+:
- standalone mode: the call is launched in a new browser tab and provides a server-side callback and a rediderct URL for client-side callbacks;
- embedded mode: the call is launched within an HTML iframe directly in the client procedure, allowing for client-side callbacks (in form of window.postMessage) as described in the network and media test and call status check [Client side events section and Call closing section).

In case of embedded mode, the iframe must have allow property set to include geolocation, camera, and microphone access, as following:

allow="geolocation; camera; microphone"

If this API is used to start a single video identification process, the id_process parameter is mandatory.\
If LiveID+ should automatically perform a check to decide whether to use a live process or a self process, the id_process_live and id_process_self are mandatory. The procedure to determine which process to choose has to be discussed with Namirial in the set up phase.\
The id_process parameter and id_process_self, id_process_live couple are mutually exclusive.

## service-webrtc-test (deprecated)

 - [POST /app/service-webrtc-test](https://docs.namirial.app/products/liveidplus/2.1-test/enterprise/developer-documentation/api-definition/app/servicewebrtctest.md): service-webrtc-test is in the process of being deprecated. For initial integration with LiveID+, it is strongly recommended to use the service-start API.

To initiate a video identification, a request to the LiveID+ system has to be performed in order to check the compatibility of the customer's device with the platform. Only if this check is successful will the video identification process begin.

There are two modes in which the video identification call can be initiated:
- standalone mode: the call is launched in a new browser tab and does not allow for client-side closing callbacks;
- embedded mode: the call is launched within an HTML iframe directly in the client procedure, allowing for client-side callbacks (in form of window.postMessage) as described in the Client side events section and Call closing section).

If you choose to use embedded mode, the iframe must have the allow property set to include geolocation, camera, and microphone access, as following:\
allow="geolocation; camera; microphone"

