OTP Capture Sources

Agent OTP can capture verification codes from multiple sources. Each source has different setup requirements and capabilities.

Supported Sources

SMS (Android)

Capture SMS verification codes using the Agent OTP Android app. Requires installing the app on your Android device.

Setup Guide →

Email

Capture email verification codes via Gmail API or IMAP integration. Works with most email providers.

Setup Guide →

WhatsApp

Capture WhatsApp verification codes. Coming soon.

Coming Soon

iOS SMS

Capture SMS on iOS devices. Exploring feasibility.

Planned

Source Filtering

When requesting an OTP, you can specify which sources to accept and filter by sender:

const request = await client.requestOTP({
  reason: 'Sign up verification',
  expectedSender: 'GitHub',
  filter: {
    // Only accept from these sources
    sources: ['email', 'sms'],

    // Match sender pattern (wildcards supported)
    senderPattern: '*@github.com',

    // Match content pattern (optional)
    contentPattern: 'verification code',
  },
  publicKey: publicKeyBase64,
});

Filter Options

OptionDescriptionExample
sourcesArray of accepted sources['email', 'sms']
senderPatternWildcard pattern for sender*@google.com
contentPatternRegex pattern for message contentverification.*code

SMS (Android)

The Agent OTP Android app captures SMS verification codes and securely relays them to the service.

Features

  • Automatic OTP detection using pattern matching
  • Runs in background with minimal battery impact
  • Local encryption before sending to server
  • Notification when OTP is captured

Limitations

  • Android only (iOS does not allow SMS access)
  • Requires SMS permissions
  • Some carriers may delay SMS delivery

See the Android Setup Guide for installation instructions.

Email

Agent OTP can capture verification codes from email using Gmail API or IMAP integration.

Gmail API

  • OAuth-based authentication
  • Real-time push notifications
  • Fine-grained permission scopes
  • Best for Gmail users

IMAP

  • Works with any email provider
  • App password authentication
  • Polling-based (slight delay)
  • Self-hosted friendly

See the Email Setup Guide for configuration instructions.

Choosing the Right Source

Use CaseRecommended Source
Phone verification (most services)SMS (Android)
Email verificationEmail (Gmail/IMAP)
Two-factor authenticationSMS or Email (depends on 2FA setup)
Bank/financial verificationSMS (most banks use SMS)

See Also