2.6 KiB
2.6 KiB
TextMe Mobile Token Capture Guide
Since TextMe's web auth is broken (DNS doesn't resolve), we need to capture tokens from the mobile app.
Prerequisites
# Install mitmproxy
brew install mitmproxy
# Or with pip
pip install mitmproxy
Step 1: Start the Proxy
cd ~/.clawdbot/workspace/textme-integration/scripts
mitmproxy -s capture-token.py
This starts an intercepting proxy on port 8080.
Step 2: Configure Your Phone
Find Your Computer's IP
ipconfig getifaddr en0 # or en1 for ethernet
iOS
- Settings → Wi-Fi → tap (i) on your network
- Scroll to "Configure Proxy" → Manual
- Server:
<your-computer-ip> - Port:
8080
Android
- Settings → Wi-Fi → long press your network → Modify
- Show advanced options
- Proxy: Manual
- Hostname:
<your-computer-ip> - Port:
8080
Step 3: Install mitmproxy Certificate
With proxy configured, open Safari/Chrome on your phone:
- Go to
http://mitm.it - Download the certificate for your OS
- iOS: Settings → General → VPN & Device Management → Install the cert
- iOS: Settings → General → About → Certificate Trust Settings → Enable full trust
- Android: Settings → Security → Install from storage
Step 4: Capture the Token
- Open the TextMe app on your phone
- Log in or just use the app (if already logged in)
- Watch mitmproxy terminal for "🎉 TOKEN CAPTURED!"
The token is saved to ~/.textme/captured-token.json
Step 5: Use the Token
# Copy token to credentials file
cat ~/.textme/captured-token.json
# Test with CLI (after updating auth to use saved token)
textme whoami
Step 6: Disable Proxy
Important! After capturing, remove the proxy settings from your phone or it won't have internet access.
Troubleshooting
App shows SSL errors
- Make sure the mitmproxy CA cert is trusted
- Some apps use certificate pinning - may need to use Frida/objection to bypass
No traffic appears
- Check firewall allows port 8080
- Verify phone and computer are on same network
- Try
mitmwebfor a web UI
Token expires quickly
- TextMe tokens typically last 24 hours
- The CLI will need token refresh support (already built in auth.ts)
Alternative: Android Emulator
If you don't want to proxy a physical phone:
# Install Android Studio, create an emulator
# Root the emulator and install the APK
# Use adb to set proxy:
adb shell settings put global http_proxy <your-ip>:8080
Files Created
After capture:
~/.textme/captured-token.json- The JWT token~/.textme/discovered-endpoints.json- All API endpoints seen