Overview
Auto-Extract Codes
Automatically extract verification codes from SMS using platform-specific regex patterns
Multi-Platform
Supports LinkedIn, Instagram, Facebook, TikTok, and Google
Long-Poll API
Workers can wait up to 5 minutes for verification codes
Modem-to-Account
Map SIM phone numbers to platform accounts for routing
Architecture
Quick Start
1. Create SMS-to-Account Mapping
Link a modem’s SIM to a platform account:2. List Mappings
3. Wait for Verification Code
SpiderPhone workers use the long-poll endpoint:4. Mark Code as Used
After successfully entering the code:Supported Platforms
The SMS Bridge automatically extracts verification codes using platform-specific patterns:| Platform | Pattern Example | Code Format |
|---|---|---|
| ”Your verification code is 123456” | 6 digits | |
| ”123456 is your Instagram code” | 6 digits | |
| ”Your Facebook code is 12345” | 5-6 digits | |
| TikTok | ”123456 is your TikTok verification code” | 6 digits |
| ”G-123456 is your verification code” | 6 digits |
API Reference
SMS Mappings
| Endpoint | Method | Description |
|---|---|---|
/admin/sms/mappings | POST | Create mapping |
/admin/sms/mappings | GET | List mappings |
/admin/sms/mappings/{id} | PUT | Update mapping |
/admin/sms/mappings/{id} | DELETE | Delete mapping |
Verification Codes
| Endpoint | Method | Description |
|---|---|---|
/admin/sms/verifications/pending | GET | List pending codes |
/admin/sms/verifications/wait | GET | Long-poll for code |
/admin/sms/verifications/{id}/use | POST | Mark code as used |
/admin/sms/verifications/cleanup | POST | Clean expired codes |
Statistics
Worker Integration
Python Example
Best Practices
Set up primary mappings
Set up primary mappings
- Each account should have one primary SIM for receiving codes
- Use
is_primary: truefor the main verification number - Backup SIMs can be added with
is_primary: false
Handle timeouts gracefully
Handle timeouts gracefully
- Default timeout is 120 seconds
- Max timeout is 300 seconds (5 minutes)
- Implement retry logic for failed verifications
Monitor code expiration
Monitor code expiration
- Verification codes expire after 5 minutes
- Run cleanup periodically to remove expired codes
- Check
expires_atbefore using a code
Use specific filters
Use specific filters
- Filter by
phone_account_idwhen possible - This prevents code collisions between accounts
- Platform-only filtering works for single-account setups
Troubleshooting
No code received
No code received
- Verify modem is receiving SMS: Check
GET /admin/proxy/modems/{id}/sms - Check mapping exists:
GET /admin/sms/mappings - Verify SpiderHub agent is running and polling
- Check signal strength on modem
Code not extracted
Code not extracted
- Check SMS format matches expected patterns
- View raw SMS in
proxy_sms_logtable - Platform may have changed message format
- Contact support to update extraction patterns
Code already used
Code already used
- Each code can only be used once
- Check if another worker consumed the code
- Use
phone_account_idfilter to isolate codes
