Automatically monitors your USCIS case status by reading the JSON response from the official USCIS API, and sends you an email notification whenever the status changes. Supports multiple accounts simultaneously.
Tested on:
- ✅ Raspberry Pi (ARM64 / Debian)
- ✅ macOS
⚠️ Windows — should work in theory, but not tested. Reports welcome.
- A browser window (Chrome or Chromium) stays open and logged in to your USCIS account.
- The tracker checks your case status every hour via the USCIS API.
- When the status changes, you get an email with the new status and a link to your case.
- If the session expires, the tracker automatically logs back in using your credentials and a Gmail 2FA code.
- Python 3.9 or higher
- Google Chrome or Chromium browser
- A Gmail account for receiving USCIS status notifications (can be the same account used for USCIS login)
- A Gmail App Password for 2FA code retrieval (not your regular Gmail password)
- Your USCIS account's verification method must be set to "Email" (not SMS) so the tracker can fetch 2FA codes automatically from Gmail. Change this at myaccount.uscis.gov → Profile → Two-Step Verification → choose Email.
Raspberry Pi / ARM Linux users: also install chromedriver via apt — Selenium can't auto-download an ARM build:
sudo apt install chromium-chromedriverOn x86 Linux, macOS, and Windows, Selenium auto-manages the driver.
- Enable 2-Step Verification on your Google account at myaccount.google.com/security
- Go to myaccount.google.com/apppasswords
- Create a new app password (name it anything, e.g. "USCIS Tracker")
- Copy the 16-character password — you'll need it in the config
git clone https://github.com/wangchao92/uscis-api-case-tracker.git
cd uscis-api-case-trackerpip install -r requirements.txtCopy the example config and fill in your details:
cp config.yaml.example config.yamlEdit config.yaml:
uscis:
check_interval_hours: 1 # How often to check (hours)
accounts:
- name: "My Account"
browser_port: 9222 # Leave as-is unless you have a conflict
browser_profile_path: "./browser-profile-uscis1" # Where to store browser data
username: "you@gmail.com" # Your USCIS login email
password: "your_uscis_password"
verification_email: "you@gmail.com" # Gmail for fetching 2FA codes
verification_app_password: "xxxx xxxx xxxx xxxx" # Gmail App Password (16 chars)
cases:
- case_number: "IOE0000000000" # Your USCIS case number
case_type: "I-485"
email:
smtp_server: "smtp.gmail.com"
smtp_port: 587
sender_email: "you@gmail.com"
sender_password: "xxxx xxxx xxxx xxxx" # Same Gmail App Password
recipient_email: "you@gmail.com" # Where to send notificationsImportant: Both the
accountsblock AND theverification_app_password(fetching 2FA codes via IMAP) andsender_password(sending notifications via SMTP).
Security note: config.yaml is excluded from git and will never be committed.
python start_browser.pyThis opens a Chrome/Chromium window for each account. Log in to your USCIS account in each browser window. Once logged in, leave the windows open — the tracker will keep the sessions alive automatically.
python tracker.pyThe tracker will check your cases immediately, then every hour. Keep this terminal running (or set it up as a background service — see below).
Use nohup to keep it running after you close the terminal:
nohup python tracker.py > tracker.log 2>&1 &Or create a systemd service for automatic startup.
nohup python tracker.py > tracker.log 2>&1 &Run in a minimized Command Prompt, or create a Task Scheduler entry.
Add additional entries under accounts: in config.yaml. Each account needs a unique browser_port (9222, 9223, etc.):
accounts:
- name: "My Account"
browser_port: 9222
...
- name: "Spouse Account"
browser_port: 9223
...start_browser.py will open one browser window per account automatically.
| Platform | Browser command auto-detected | Tested |
|---|---|---|
| Raspberry Pi / Debian Linux | chromium-browser |
✅ Yes |
| Ubuntu / Other Linux | chromium, google-chrome |
|
| macOS | /Applications/Google Chrome.app/... or Chromium |
✅ Yes |
| Windows | Standard Chrome install path |
"Chromium remote debugging not available"
The browser isn't running or wasn't started with the right flags. Run python start_browser.py first.
"IMAP auth error"
Your Gmail App Password is wrong or IMAP is disabled. Check Gmail settings → Forwarding and POP/IMAP and make sure IMAP is enabled.
"Login Failed" email notification
The auto-login couldn't complete. Open the browser window for that account, log in manually, then restart tracker.py.
500 errors in the log
Usually means the session expired mid-check. The tracker will automatically retry with a fresh login on the next cycle.
This is an unofficial tool and is not affiliated with, endorsed by, or sponsored by USCIS or the U.S. government. It uses the same public API that the USCIS website itself calls. Use at your own risk — be respectful of the service (the default 1-hour check interval is intentionally conservative; don't lower it aggressively). The author assumes no responsibility for any consequences of use, including missed notifications or account issues.