Mobile SDK and server-side integration is suitable for scenarios where you have an existing mobile app and want to use the app to perform online authentication for users. This topic describes the process of integrating the financial-grade NFC authentication solution by using App (SDK) integration.
Integration overview
Alibaba Cloud provides SDKs for multiple programming languages, including Java, C#, Go, Python, Node.js/TypeScript, PHP, and C++. By integrating an SDK, you can call the financial-grade real-person authentication service APIs directly. The SDKs handle the request signing logic, timeouts, and retry mechanisms, and return structured response objects for easier development.
If the SDKs do not meet your business requirements, you can call the financial-grade real-person authentication service APIs by using raw HTTP or HTTPS requests. Because custom requests require a signature, you need to implement the signing mechanism. For more information, see V3 RPC-style request body and signature mechanism.
Background
The following sequence diagram shows the integration workflow for a mobile app.
Table 1. Sequence diagram call descriptions
Step | Description |
1 | Initialize the authentication SDK. |
2 | The app calls the authentication SDK to obtain the MetaInfo. |
3 | The authentication SDK returns the MetaInfo. |
4 | The app sends an authentication request with the MetaInfo to the application server. |
5 | The application server calls the initialization API. |
6 | The Alibaba Cloud server returns a CertifyId to the application server. |
7 | The application server passes the CertifyId to the app. |
8 | The app starts the authentication SDK. |
9 | The authentication SDK sends the user's verification materials to the Alibaba Cloud server. |
10 | The Alibaba Cloud server determines the authentication result based on the materials. |
11 | The Alibaba Cloud server returns the authentication result to the SDK. |
12 | The SDK uses a callback function to notify the app to check the authentication status. |
13 | The app requests the authentication status from the application server. |
14 | The application server calls the query API to retrieve the authentication result. |
15 | The Alibaba Cloud server returns the final authentication result to the application server. |
Procedure
Activate the financial-grade real-person authentication service.
Add an authentication scenario.
NoteWhen you add an authentication scenario, you can authorize Alibaba Cloud to access a specified OSS bucket to store images of the verification materials. For more information, see Activate and authorize OSS storage.
Integrate the app authentication solution.
Call the server-side initialization API InitFaceVerify.
This API call retrieves the CertifyId, the unique ID for the authentication session. The CertifyId links all related API calls in the authentication request. For more information, see InitFaceVerify-Initiate an NFC authentication request.
Integrate the client SDK.
The client SDK implements the in-app facial verification process. For platform-specific instructions, see:
Android integration
Call the server-side query API DescribeFaceVerify.
After the authentication process is complete, you can call this API to obtain the authentication status and verification materials. For more information, see DescribeFaceVerify-Query NFC authentication results.