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 →Capture email verification codes via Gmail API or IMAP integration. Works with most email providers.
Setup Guide →Capture WhatsApp verification codes. Coming soon.
Coming SooniOS SMS
Capture SMS on iOS devices. Exploring feasibility.
PlannedSource 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
| Option | Description | Example |
|---|---|---|
| sources | Array of accepted sources | ['email', 'sms'] |
| senderPattern | Wildcard pattern for sender | *@google.com |
| contentPattern | Regex pattern for message content | verification.*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.
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 Case | Recommended Source |
|---|---|
| Phone verification (most services) | SMS (Android) |
| Email verification | Email (Gmail/IMAP) |
| Two-factor authentication | SMS or Email (depends on 2FA setup) |
| Bank/financial verification | SMS (most banks use SMS) |