Identity Verification Service: How Integration Works and How to Plan It

TL;DR
An identity verification service lets your application collect identity evidence through an App SDK, a hosted H5 page or server-side APIs (a document image, a selfie video, or both) and get back a structured result saying whether the document looks genuine, whether a live person was present, and whether that person matches the document. Before writing code, agree on who does what:
- Your backend starts every session. It holds the API keys, asks the provider for a short-lived token, and records which customer that token belongs to.
- The device captures the document and selfie through an SDK or a hosted web page. It doesn't decide whether the user gets in.
- Your backend also fetches the result. A redirect or in-app callback only tells you the session ended.
- Your own policy turns scores and error codes into approve, retry or review.
- Exceptions such as retries, expired tokens, unsupported documents and manual review will take up a large share of the integration work, so plan for them early.
What Is an Identity Verification Service?
An identity verification service is the complete remote verification capability a provider offers: identity evidence is captured through an App SDK, a hosted H5 page or server-side APIs, and the service returns machine-readable results about a person's claimed identity, used to onboard customers remotely without an in-person check.
In practice, it is made up of several parts: a capture client (an SDK inside your app, or a hosted H5 page), server-side endpoints (one starts a session, one returns the result), and sometimes a separate channel that pushes events to you. Capture usually runs in the SDK or H5 page, because the quality of the selfie and document images decides most outcomes.
Integration is one layer of a larger solution. Which checks to run for which customers, and when to send a case to a person, is a design question covered in our guide to identity verification solution design . This article stays at the integration layer.
What Can Each Verification Call Prove, and What Can't It?
Each check answers a narrow question, and it's easy to read one check's "pass" as proof of something it never tested.
| Check | Question it answers | Typical output | What it cannot prove on its own |
|---|---|---|---|
| Document OCR | What does the document say? | Structured fields, portrait crop | That the document is genuine |
| Document authenticity | Does the document show signs of tampering, copying or screen capture? | Warnings or risk flags | That the person holding it is the owner |
| Liveness detection | Was a live person in front of the camera? | Pass / fail, error code | Who that person is |
| Face comparison (1:1) | Is the selfie the same person as the reference photo? | Similarity score | That the reference photo itself is genuine |
| AI-generated face detection | Does the image or video show signs of face swap or synthetic media? | Risk level and attack type | That the session came from a real camera |
| AML screening | Does the name appear on sanctions, PEP or adverse-media lists? | Hit / no hit with details | Anything about the document or face |
A complete identity verification flow chains several of these together and ties them to the same session.
How Does Identity Verification Service Integration Work?
Most identity verification services follow the same three-stage pattern: start the session on the server, capture on the device, read the result on the server. The steps below use a bank-account opening as the example.
1. Your backend creates the session
The customer taps "Open account". Your app asks your own server to start verification. Your server calls the provider with its secret credentials and any session settings, such as the liveness mode or a reference photo, and receives a session token.
Store the token against your internal customer ID before you return anything to the client. If you lose that mapping, you cannot reconcile results later.
2. Your backend hands a short-lived token to the client
The client gets only what it needs: a token for the SDK, or a URL for a hosted page. Never ship permanent API keys inside a mobile app or web page. Anyone can extract them.
Tokens are short-lived on purpose. When one expires, start a new session instead of retrying with the old token.
3. The user completes capture
The SDK or hosted page guides the user through document photos and a selfie video, checks image quality, and uploads the media directly to the provider. Your app usually sees progress events rather than the raw media.
Separate "try again" problems from suspicious ones. "Move closer" and "glare on the document" should not end up in the same bucket as a failed liveness check.
4. Your backend fetches the result
When capture ends, the client gets a signal: an SDK callback, or a redirect back to your page with the token attached. That signal is not the result. The user controls the device and the browser, so a redirect only shows that the page was left.
Your server calls the result endpoint with the token and reads the authoritative answer. Many providers also let you fetch the same result more than once within a retention window, which helps with retries and audits.
5. Your policy makes the decision
Map each outcome to an action in your own system: approve, ask the user to retry, route to manual review, or decline. Keep that mapping in your code, version it, and log which version decided each case.
API, SDK or Hosted Web Page: Who Does What?
The three common integration patterns differ mainly in who owns capture and the user interface.
| Pattern | Who captures | Who owns the UI | Fits when | Trade-off |
|---|---|---|---|---|
| Pure API (server-to-server) | You | You | You already capture media in a trusted flow, or need batch checks | You take on capture quality, consent screens and replay protection |
| App SDK (iOS / Android) | Provider SDK inside your app | Shared; SDK screens are customizable | You have a native app and want the provider's capture guidance and device checks | SDK size, version upgrades, licence handling |
| Hosted web page (mobile H5) | Provider page in the browser | Provider, with configuration | You need web onboarding or the fastest path to a working flow | Browser support varies; less control over the look and feel |
Teams often mix them. A common split is SDK for the app, hosted page for web, and pure API for re-checking an existing customer's selfie against a stored photo. Our article on mobile identity verification goes deeper into SDK versus H5.
Webhooks or Polling: How Should Your Backend Get Results?
Polling means your server asks for the result when the client says capture is done. It is simple and works well when the user is waiting on screen.
Webhooks mean the provider calls your HTTPS endpoint when something changes. They matter when results can arrive later, for example after a manual review or when a screening list updates.
If you use webhooks:
- Verify the signature before you trust the payload. Until it is verified, a webhook is just a POST request anyone could send.
- Expect duplicates and out-of-order delivery. Make the handler idempotent, keyed on the session or event ID.
- Fetch the canonical result before acting if the event only says "something changed".
- Return quickly. Acknowledge first, then process asynchronously.
How Tencent Cloud eKYC Approaches Identity Verification Integration
Tencent Cloud eKYC follows the server-starts, device-captures, server-reads pattern for its SDK and H5 integrations, and offers a pure API for selfie verification. The table maps the official integration modes to the documented API pairs.
| Product and mode | Start the session | Read the result | Notes from the official docs |
|---|---|---|---|
| Selfie Verification, App SDK | GetFaceIdTokenIntl | GetFaceIdResultIntl | SDK token valid for 10 minutes and for one verification process; result can be fetched multiple times for 72 hours |
| Selfie Verification and Identity Verification, mobile H5 | ApplyWebVerificationBizTokenIntl | GetWebVerificationResultIntl | Returns a BizToken and VerificationURL; the token is appended to your RedirectURL when the user finishes; result can be fetched for three days |
| Identity Verification, App SDK | ApplySdkVerificationToken | GetSdkVerificationResult | Result can be fetched multiple times for three days |
| Selfie Verification, pure API | CompareFaceLiveness | Same call (synchronous) | You upload a photo and a liveness video; LivenessType is ACTION or SILENT; returns a similarity score Sim |
A few details worth knowing before you plan:
- Security level is chosen per session. The SDK token APIs take an
SdkVersionparameter. Per the integration guide, Basic suits general business, Enhance (adds device risk detection) suits financial account opening and important account verification, and Plus (adds device risk detection and AI Face Shield) suits high-value transactions and sensitive information changes. Coverage of each version differs between SDK and H5, so check the integration guide for your mode. - Requests are signed with TC3-HMAC-SHA256, and a request fails if its timestamp is more than five minutes off. Keep server clocks synced.
- Rate limits apply per API. The default limit is 20 requests per second and can be raised on request; a few APIs have their own limits, listed in the API documentation.
Identity Verification (document plus selfie) currently supports documents from Hong Kong (China), Malaysia, the Philippines, Indonesia, Singapore and Thailand. Selfie Verification supports all regions. See the Tencent Cloud eKYC documentation for parameters and error codes, and the Tencent Cloud eKYC overview for the product line-up.
Integration Checklist
Use this before you call an integration "done".
| # | Item | Why it matters | Where to check |
|---|---|---|---|
| 1 | API keys live only on the server, in a secret store | Leaked keys let anyone run billable calls | Your deployment config |
| 2 | Every token is stored against your internal customer ID | Results you cannot map are useless for audit | Your session table |
| 3 | Access is granted only after a server-side result fetch | Redirects and app callbacks can be faked | Your onboarding service |
| 4 | Each error code maps to retry, review or decline | Not every failure is fraud | Provider error-code list |
| 5 | Expired-token and timeout paths start a fresh session | Prevents stuck users and duplicate charges | Token validity in API docs |
| 6 | Webhook signatures are verified; handlers are idempotent | Stops spoofed and duplicate events | Webhook API docs |
| 7 | Rate limits and back-off are tested near your peak load | Throttling during a campaign looks like an outage | API rate-limit table |
| 8 | Logs exclude images, video and full ID numbers | Limits what a log leak exposes | Your logging config, data-retention policy |
| 9 | The decision policy is versioned and recorded per case | You can explain past decisions later | Your policy store |
| 10 | Test cases cover failures, not only the happy path | Production traffic is mostly edge cases | Integration test guide |
Common Integration Mistakes
Granting access from the redirect URL
The redirect only says the user left the verification page. Fetch the result on the server before you change any account state.
Treating every failure as fraud
Blurry photos, expired documents and poor lighting are ordinary causes of failure. Send recoverable problems back to the user with a clear prompt, and give "suspected attack" its own path.
Putting keys in the client
Mobile apps and web pages can be decompiled or inspected. Permanent credentials belong on your server only.
Retrying without a budget
Providers usually bill per call, and some failed results are billable too. Cap retries per customer and per session, and check the billing rules for error codes before you design retry loops.
Logging full payloads
Result payloads can contain portraits, video links and document numbers. Log IDs, codes and decisions, and fetch details on demand.
Testing only the happy path
Real users bring old phones, glasses, glare and weak networks. Test with them, and test what happens when your own backend is slow.
Limitations and Considerations
An identity verification service returns evidence for your decision. It doesn't cover your compliance obligations. Which checks a regulated business must run, how long it must keep records and when a person must review a case depend on the jurisdiction and the business. Confirm those requirements with your compliance team.
A few practical limits apply to most providers, including this one:
- Coverage is not uniform. Document support, liveness modes and data regions differ by product and country. Check the support list for the documents your customers actually hold.
- Some cases need a person. Plan the manual review queue before launch, not after the first complaint.
- There may be no separate test environment. Tencent Cloud does not provide one for eKYC, so integration tests run in production and consume calls. Use test accounts and your own, consented test data.
- Browser and device support matters. H5 capture depends on browser support for real-time audio and video. Where that is missing, Tencent Cloud eKYC falls back to video (silent) mode so the user can still finish.
Frequently Asked Questions
What is an identity verification service?
An identity verification service is the complete remote verification capability a provider offers. It captures identity evidence through an App SDK, a hosted H5 page or server-side APIs, and returns structured results such as document fields, liveness outcome and face similarity. Your application uses those results to decide whether to onboard a customer.
Is an identity verification service the same as KYC?
Not quite. An identity verification service checks that a person is real and matches their document. KYC is a wider business obligation that can also include screening, risk assessment and record keeping. Identity verification is usually one component of a KYC process.
Should identity verification run from the front end?
Capture should run on the device, through an SDK or hosted page. Session creation and result retrieval should run on your server, because that is where your API keys and access decisions belong.
Do I need webhooks if I can poll for results?
Polling is enough when the user waits on screen for the outcome. Webhooks help when results change later, for example after a review or a screening-list update. If you use both, treat the webhook as a prompt to fetch the canonical result.
Which integration modes does Tencent Cloud eKYC support?
Selfie Verification supports App SDK, mobile H5 and pure API integration. Identity Verification, which combines document capture, liveness and face comparison, supports App SDK and mobile H5. AI Face Shield is available as an API.
Related Resources
Start Testing
First-time users who activate Tencent Cloud eKYC receive a free resource bundle of 100 calls each for AI Face Shield, Selfie Verification and Identity Verification, issued for the billing items listed in the Purchase Guide (mainly Basic modes). The bundles appear in the console about 30 minutes after activation and are valid for one year. After a free bundle is used up, billing moves to any prepaid bundle you hold, and otherwise to pay-as-you-go. Check the Billing Overview in the Purchase Guide for current terms
About Tencent Cloud eKYC
Tencent Cloud eKYC uses AI technology to remotely verify user identities automatically, combining document recognition, liveness detection and face comparison. Its App SDKs, mobile H5 pages and pure APIs let teams keep keys and decisions on their own servers while the capture runs on the user's device.
