Actual Links Email Linking: Android Developer Guide

This guide covers everything you need to integrate email linking into your Android app: how it works, setup, authentication, retrieval, and references.

How It Works

  1. Authenticate — The user connects their email account through your app using IMAP. Credentials are stored on-device only and are never sent to or stored on Actual servers.
  2. Extract — The SDK searches the user’s inbox for receipt emails from supported merchants and returns structured purchase data.
  3. Enrich (optional) — If Product Intelligence is enabled, extracted line items are matched against the product catalog for UPC, brand, and category.

Supported Email Providers

ProviderAuthenticationNotes
GmailIMAP with App PasswordSDK automates App Password creation, or user can enable Less Secure Apps
YahooIMAP with App PasswordSDK automates App Password creation
AOLIMAP with App PasswordSDK automates App Password creation

The SDK supports linking multiple IMAP accounts simultaneously.

Choose Your Integration Approach

ApproachHow it worksBest for
On-Device (Local)SDK searches the inbox directly from the user’s device. Results returned immediately in callback.Real-time results while the user is in the app
On-Device Auth + Server Processing(Recommended)User authenticates on-device. Inbox search happens asynchronously on Actual’s server. Results posted to your webhook.Background processing without requiring the app to stay open
Server-OnlyNo SDK. Send email data (EML format) directly to the remote scrape API.Systems that already collect email data externally
Email ForwardingUsers forward receipts to a dedicated inbox. Actual processes every two minutes.Passive collection, minimal integration effort

Requirements

RequirementVersion
Android Min SDK23+ (Android 6.0+)
Android Compile SDK36+
Java17+
Architecturearmeabi-v7a, arm64-v8a

Installation

  1. Add the Maven repository:

Kotlin DSL:

repositories {
    maven { url = uri("https://maven.microblink.com") }
}

Groovy:

repositories {
    maven { url "https://maven.microblink.com" }
}
  1. Add the dependency:

Kotlin DSL:

dependencies {
    implementation(platform("com.microblink.blinkreceipt:blinkreceipt-bom:1.9.13"))
    implementation("com.microblink.blinkreceipt:blinkreceipt-digital")
}

Groovy:

dependencies {
    implementation platform("com.microblink.blinkreceipt:blinkreceipt-bom:1.9.13")
    implementation "com.microblink.blinkreceipt:blinkreceipt-digital"
}

→ Android SDK Repository (GitHub)

License Keys

You need two keys: a license key and a Product Intelligence key.

Option A: Android Manifest

<meta-data
    android:name="com.microblink.LicenseKey"
    android:value="YOUR-LICENSE-KEY"
/>

<meta-data
    android:name="com.microblink.ProductIntelligence"
    android:value="YOUR-PROD-INTEL-KEY"
/>

Option B: Programmatically

Kotlin:

BlinkReceiptDigitalSdk.licenseKey = "YOUR-LICENSE-KEY"
BlinkReceiptDigitalSdk.productIntelligenceKey = "YOUR-PROD-INTEL-KEY"

Java:

BlinkReceiptDigitalSdk.licenseKey("YOUR-LICENSE-KEY");
BlinkReceiptDigitalSdk.productIntelligenceKey("YOUR-PROD-INTEL-KEY");

Initialize the SDK

Kotlin:

BlinkReceiptDigitalSdk.initialize(this, object : InitializeCallback {
    override fun onComplete() {
        // Ready to use
    }

    override fun onException(throwable: Throwable) {
        // Log exception
    }
})

Java:

BlinkReceiptDigitalSdk.initialize(this, new InitializeCallback() {
    @Override
    public void onComplete() {
        // Ready to use
    }

    @Override
    public void onException(@NonNull Throwable throwable) {
        // Log exception
    }
});

IMAP Authentication, Retrieval & Configuration

After installation and initialization, the email linking flow (IMAP authentication, local and remote retrieval, search window configuration, order aggregation, signing out) follows the same concepts across iOS and Android. For detailed code examples:

Remote Retrieval: Server-Side Configuration

If using the recommended On-Device Auth + Server Processing approach, you also need to configure the server side:

SettingDescription
Webhook endpoint URLWhere Actual posts results
Retailer email addressesWhich merchants to look for
Cutoff datesPer-retailer or global
Country code (optional)Improves extraction if receipts are from a specific country

→ eReceipts Configuration API (SwaggerHub) → Webhook Documentation

Supported Merchant Emails

The list of merchant email senders that Actual processes is publicly available and updated regularly.

→ Supported Merchant Emails

Emails from senders not on this list are not processed or stored.

Email Receipt Data

Email receipts return the same core fields as paper receipts (merchant, date, total, line items) plus additional fields:

FieldDescription
ereceiptOrderNumOrder number from the email receipt
ereceiptRawHTMLRaw HTML content of the receipt email
shippingStatusShipping status per line item
ereceiptComponentEmailsComponent emails for aggregated orders

For the full list of returned fields, see the Data Reference →.


Error Handling

Error typeReference
IMAP errors (auth failures, App Password issues, connection timeouts)Remote Error Codes (SwaggerHub)
Remote scraping errors (job failures, processing issues)Remote Error Codes (SwaggerHub)

Testing Recommendations

  • Test each supported provider (Gmail, Yahoo, AOL) end to end
  • Test with accounts that have varying volumes of receipt emails
  • Test the remote scraping flow including webhook delivery
  • Verify cutoff date behavior
  • Test account unlinking and re-authentication
  • Test aggregation with orders that generate multiple emails

Implementation Timeline

ScopeEstimated Dev Time
Single provider~1 week + QA
All providers + remote scraping~2 weeks + QA
Server-side webhook setupAdditional ~1 week

Additional References

Related

Let’s Turn Proof Into Action 

Your next move should be backed by proof, and we’re here to help you leverage real data for real results. Start turning verified insights into measurable impact today.