Integration workflow
Financial-grade Face Verification provides a Web SDK to help you implement the face verification feature in a browser or an embedded WebView. This topic describes how to use H5 page integration for Financial-grade Face Verification.
Integration overview
This integration solution requires building a web client and an application server. These components connect to the verification server to complete the verification.
Server side
The server needs to integrate the InitFaceVerify (initiate verification request) and DescribeFaceVerify (get detailed verification data) APIs:
The InitFaceVerify API is essential for verification. This API returns the verification page URL (CertifyUrl) and ID (CertifyID), and enables redirection to your business page after verification is complete.
The DescribeFaceVerify API retrieves the final verification result. Call this API to obtain detailed result information when the client receives a completion status (passed or failed).
The following sequence diagram illustrates how to use these two APIs.
In the diagram, Verification refers to face verification.
In the diagram, "with" in a message description indicates the data required for that request. For more information, see InitFaceVerify - Initiate verification request, PC or mobile H5 page integration code samples, and DescribeFaceVerify - Get detailed verification data.
Web client
The web client needs to build a verification trigger page and a result display page:
The verification trigger page sends an initialization request to the InitFaceVerify API that is integrated on your server. After the server returns the
CertifyUrl, your web client redirects the user to the verification page.After verification is complete, the verification server automatically redirects the user to the result display page. You specify this page's address with the
ReturnUrlparameter when your server calls theInitFaceVerifyAPI.On the result display page, send a request with the
CertifyIDto your server to call the DescribeFaceVerify API and retrieve the final verification result.
Prerequisites
To use the Financial-grade Identity Verification Service, you must first enable it. For instructions, see Enable Financial-grade Identity Verification Service.
For fine-grained service access management, create a RAM user before you integrate the SDK. Grant the RAM user access to your cloud resources to call service interfaces and obtain OpenAPI access credentials. For instructions on creating a RAM user, granting permissions, and generating an AccessKey, see Authorize a RAM user to access the service.
- Note
When adding a verification scenario, you can authorize Alibaba Cloud to access a specified OSS bucket to store images from the verification process. For more information, see Activate and authorize OSS storage.
Integration steps
Perform the server-side integration to obtain the verification URL.
For detailed steps, see Server-side integration.
On the web client, redirect the user to the verification URL.
For detailed steps, see H5 page integration.