Skip to main content

Integrating Didit's Data Extraction API with Go Microservices and gRPC

Discover how to seamlessly integrate Didit's powerful Data Extraction API into your Go microservices architecture using gRPC. This guide covers the benefits of this approach, practical implementation steps, and how Didit's.

Integrating Didit's Data Extraction API with Go Microservices and gRPC

Contents

In this guide

Jump to the part you need.

Leverage gRPC for High PerformanceIntegrating Didit's Data Extraction API with Go microservices via gRPC ensures efficient, low-latency communication, crucial for real-time identity verification workflows.

Streamline Identity Verification WorkflowsBy combining Didit's advanced ID Verification capabilities with a robust microservices architecture, businesses can automate and accelerate KYC processes, reducing manual effort and improving accuracy.

Enhance Security and Data IntegritygRPC's strong typing and protocol buffers, coupled with Didit's secure data handling and cryptographic checks like NFC Verification, bolster the security and integrity of extracted identity data.

Didit's Modular and AI-Native ApproachDidit provides an open, modular identity layer with a developer-first ethos, offering composable identity primitives, Core KYC, and no setup fees, making integration flexible and cost-effective.

In today's fast-paced digital landscape, businesses require robust, scalable, and secure identity verification solutions. Integrating a powerful Data Extraction API like Didit's into a modern microservices architecture, particularly using Go and gRPC, offers significant advantages. This blog post explores how to achieve this, highlighting the benefits and practical steps involved in building a high-performance identity verification system.

The Power of Go Microservices and gRPC for Identity Verification

Go (Golang) has emerged as a preferred language for building microservices due to its concurrency model, efficient performance, and strong type safety. When combined with gRPC, a high-performance, open-source universal RPC framework, it creates a formidable stack for distributed systems. gRPC uses Protocol Buffers as its Interface Definition Language (IDL) and underlying message interchange format, enabling efficient data serialization and deserialization.

For identity verification, this combination is particularly potent. Real-time processing of identity documents, facial biometrics, and other KYC data demands low latency and high throughput. Go's lightweight goroutines and channels, coupled with gRPC's HTTP/2-based communication, provide the ideal foundation for handling these computationally intensive tasks efficiently.

Integrating Didit's Data Extraction API via gRPC means that your microservices can communicate with Didit's powerful backend seamlessly, requesting and receiving verified identity data with optimal speed and reliability. This architecture facilitates modularity, allowing different services to handle specific aspects of the verification process—such as ID Verification, Liveness, or AML Screening—independently and efficiently.

Understanding Didit's Data Extraction API for Seamless Integration

Didit's Data Extraction API, a core component of its ID Verification product, is designed for developer-first integration. It allows businesses to extract critical information from identity documents, such as passports and national IDs, with high accuracy. This includes OCR (Optical Character Recognition) for machine-readable zones (MRZ) and visual inspection zones, as well as barcode scanning.

The API provides structured data output, making it easy for your Go microservices to consume and process. For instance, when dealing with an ePassport or eID, Didit's NFC Verification capabilities can extract cryptographic data directly from the chip, ensuring the highest level of authenticity. The NFC verification report, for example, returns a JSON object containing the nfc object, detailing status, portrait_image, signature_image, chip_data (e.g., document type, issuing country, name, birth date, gender, nationality), authenticity checks (sod_integrity, dg_integrity), and certificate_summary.

This rich, structured data is perfect for consumption by gRPC services, which rely on Protocol Buffers for defining data structures. You can define a .proto file that mirrors Didit's expected input and output formats, ensuring type safety and reducing integration errors. For example, a DataExtractionRequest could contain an image of the document, and a DataExtractionResponse would contain fields like document_type, first_name, last_name, and the results of authenticity checks.

Practical Implementation: Building a Go gRPC Client for Didit

To integrate Didit's Data Extraction API with your Go microservice using gRPC, you would typically follow these steps:

  1. Define Protocol Buffer Schema: Create a .proto file that outlines the service methods and message structures for interacting with Didit's API. While Didit's primary API is RESTful, you can wrap it within your gRPC service. Your gRPC service would define methods like VerifyIdentity that take a request (e.g., containing document images) and return a response (e.g., containing extracted data and verification status).
  2. Generate Go Code: Use the protoc compiler along with the Go gRPC plugin to generate Go client and server code from your .proto file. This automatically creates the necessary data structures and service interfaces.
  3. Implement the gRPC Client: In your Go microservice, implement a gRPC client that calls the generated stubs. This client will then make HTTP calls to Didit's RESTful Data Extraction API. You'll handle the authentication (e.g., API keys), request formatting, and response parsing. For example, your client might take a document image, send it to Didit's endpoint, and then map Didit's JSON response back to your gRPC Protocol Buffer message.
  4. Error Handling and Retries: Implement robust error handling, including network errors, API rate limits, and verification failures. Consider exponential backoff for retries to ensure resilience.
  5. Security Considerations: Ensure all communications are encrypted (gRPC inherently supports TLS). Securely manage API keys and credentials.

This approach effectively creates a gRPC "wrapper" around Didit's REST API, allowing your internal microservices to benefit from gRPC's performance and type safety while still leveraging Didit's powerful identity verification capabilities. This modularity means that if Didit introduces new features like enhanced Passive & Active Liveness or 1:1 Face Match, your gRPC facade can be updated without disrupting other parts of your system.

Ensuring Compliance and Data Privacy with Didit

Identity verification often involves handling sensitive personal data, making compliance with regulations like GDPR paramount. Didit acts as a data processor, with you remaining the data controller, and offers configurable data retention policies. In the Business Console, you can set retention windows from 1 month to 10 years or even unlimited, applying to all verification inputs, outputs, and metadata. Enterprise accounts can also enable in-country processing for local data residency, supporting various data protection regimes.

By integrating Didit, you can leverage its AML Screening & Monitoring capabilities, which cover over 1300 global watchlists, including sanctions regimes (OFAC, UN, EU), PEPs, adverse media, and financial crime categories. This comprehensive coverage helps ensure your compliance obligations are met, providing granular taxonomy and structured metadata for every match to aid in risk prioritization and remediation.

Furthermore, Didit's AI-native approach means that its systems are continuously learning and adapting, improving accuracy and fraud detection over time. This includes advanced deepfake detection with Passive & Active Liveness, ensuring that fraudsters cannot bypass verification by presenting fake identities.

How Didit Helps

Didit provides the AI-native, developer-first identity platform that makes integrating advanced identity verification into your Go microservices simple and efficient. Our modular architecture means you can pick and choose the identity primitives you need, from ID Verification and NFC Verification to Passive & Active Liveness and AML Screening. With our clean APIs and instant sandbox, developers can quickly integrate and test solutions.

Didit stands out by offering Core KYC with pay-per-use pricing, allowing businesses to get started with essential identity checks without upfront costs. Our pay-per-successful check model, combined with no setup fees, provides a flexible and cost-effective solution for businesses of all sizes. By automating trust and orchestrating risk through composable identity checks, Didit empowers you to build secure, compliant, and user-friendly verification workflows.

Whether you're looking to enhance security, streamline user onboarding, or meet regulatory compliance, Didit's comprehensive suite of tools, including ID Verification, NFC Verification, Liveness Detection, and AML Screening & Monitoring, provides the foundation for a robust identity ecosystem.

Ready to Get Started?

Ready to see Didit in action? Get a free demo today.

Start verifying identities for free with Didit's free tier.

Try it

Try this in the sandbox

Run the check this guide describes, free.

ID Verification

The product this post is about, taken from its topic. Run it free in the sandbox.

$0.15 per checkStart free

Author

Alejandro Rosas

Co-founder and CTO

Alejandro Rosas

Alejandro Rosas

Co-founder and CTO

About Didit

Questions

Blog questions

Who writes the Didit blog?
The Didit team. Guides reviewed by Alberto Rosas, co-founder and CEO, carry his byline. The rest are published as Didit.
Which topics does the blog cover?
Eight topics: ID verification, business verification (KYB), AML, sanctions and compliance, fraud prevention, transaction monitoring and crypto, country guides, agents and developers, and product updates.
Is the blog available in my language?
Yes, in 15 languages: English, Spanish, French, German, Brazilian and European Portuguese, Catalan, Russian, Arabic, Chinese, Japanese, Hindi, Indonesian, Korean and Swahili. Not every post is translated, so each language shows the posts it has.
Where do I find product updates?
In the changelog at /changelog/ and under the Product updates topic.
Are these posts legal advice?
No. Regulation posts explain rules; your legal team decides how they apply.
How do I find posts on one topic?
Open one of the eight topics, or search the blog.
Are posts dated?
Yes. Every post shows when it was published and when it was last updated.
Do posts link to the docs?
Developer posts link to the matching page on docs.didit.me and to the API reference.
Is the blog the same as the docs?
No. The blog explains rules, markets and product changes for a general reader, while docs.didit.me holds the integration guides and the API reference. Developer posts link the matching docs page and the API reference they describe.

Compliance built in

Audited, certified and attested.

We hold the certifications and build each country's rules into your flows, so you can launch anywhere without worrying. Security and Compliance center

  • Regulation encoded into your flows

    Tell us what you do and where. Didit lists the rules that apply to you, with sources, and builds the checks each country needs into one workflow.

  • Ready for AMLR

    Every requirement of the new EU anti-money laundering rules, from checking customers to human review, is already covered by a Didit check.

  • Tested in Spain's Treasury sandbox

    Spain's Treasury published its supervised sandbox report on Didit's NFC plus active liveness onboarding; SEPBLAC took part and valued the added measures positively.

  • Audited, not self-declared

    iBeta Level 1 and Level 2. Liveness tested under ISO/IEC 30107-3.

Compliance assistant

Your obligations · 3 regions

EU · AMLRCustomer due diligence, human reviewCovered
Illinois, Texas, ColoradoExplicit biometric consentCovered
Germany · Youth protectionVerified adults only (JMStV)Covered
Workflow checked. Every obligation is met
  • SOC 2 Type 2
  • ISO 27001
  • iBeta Level 1 and Level 2
  • EU regulator attestation
  • FSM youth protection
  • GDPR
  • EBA remote onboarding
  • MiCA compatible
  • FIDO Alliance member
  • AMLREU AML Regulation ready

Integration · Didit MCP

Run Didit from your own AI agent

Connect Didit to Claude, Cursor, VS Code or ChatGPT and just ask in plain words. Your agent can do anything you can do in the console, with the same permissions you have.

Add to ClaudeChatGPT
Didit Academy · Lesson 04 · Use Didit with MCP
  • Build workflowsDescribe the checks you need. The agent creates and publishes the flow.
  • Run investigationsAsk why a session was declined, review cases, search people and companies.
  • Change rulesCreate payment rules, test them on past data and switch them on.
  • Pull reportsAsk for numbers, exports or the audit log.

Verify your first user today.

Start free

Free sandbox. Credit applies to work-email sign-ups.