Export your Uber trip receipt PDFs automatically.
Connects to your email via IMAP, finds Uber receipt emails from the last
3 months, extracts PDF download links, and saves them locally as
YYYY-MM-DD-uber-receipt.pdf.
- Go 1.25+ — install
- A Gmail account (or any IMAP-capable email) that receives Uber receipts
- An app password for your email (Gmail requires this if you have 2FA)
- Your Uber browser cookies (needed to download the actual PDF files)
git clone https://github.com/zerotohero-dev/uber-exporter.git
cd uber-exporter
make buildThis produces a uber-exporter binary in the project root.
mkdir -p ~/.config/uber-exportercat > ~/.config/uber-exporter/config.json << 'EOF'
{
"imap": {
"server": "imap.gmail.com",
"port": 993,
"username": "you@gmail.com",
"password_cmd": "cat ~/.config/uber-exporter/app-password.txt"
},
"outbox_dir": "outbox"
}
EOFEdit username to your actual email address.
What is
password_cmd? It's a shell command that prints your IMAP password to stdout. This avoids storing the password in plain text in the config file. Some examples:
Method password_cmdvaluePlain text file cat ~/.config/uber-exporter/app-password.txtmacOS Keychain security find-generic-password -s uber-exporter -w1Password CLI op read "op://Personal/Gmail App Password/password"pass pass show email/gmail-app-password
For Gmail, create an app password, then save it:
echo "your-app-password-here" > ~/.config/uber-exporter/app-password.txt
chmod 600 ~/.config/uber-exporter/app-password.txtThe PDF download requires authentication with Uber. You need to export your browser cookies after logging into riders.uber.com.
- Log into riders.uber.com in your browser
- Open DevTools (F12) → Network tab
- Click on any request to
riders.uber.com - Find the
Cookieheader in the request headers - Copy the entire value and save it:
cat > ~/.config/uber-exporter/cookie.txt << 'EOF'
sid=YOUR_SID_VALUE; jwt-session=YOUR_JWT_VALUE; csid=YOUR_CSID_VALUE; udi-id=YOUR_UDI_VALUE
EOF
chmod 600 ~/.config/uber-exporter/cookie.txtThe cookie is a single line of key=value pairs separated by ; .
The exact keys vary, but it typically includes sid, jwt-session,
csid, and udi-id among others. Copy the whole thing — don't try
to pick individual cookies.
Cookies expire. If downloads start failing with "got HTML instead of PDF", your cookies have expired. Repeat this step.
make runOr run the binary directly:
./uber-exporterPDFs are saved to outbox/ (or whatever you set outbox_dir to).
A log file uber-exporter-YYYY-MM-DD-HHMMSS.log is written to the
current directory.
~/.config/uber-exporter/config.json:
{
"imap": {
"server": "imap.gmail.com",
"port": 993,
"username": "you@gmail.com",
"password_cmd": "cat ~/.config/uber-exporter/app-password.txt"
},
"outbox_dir": "outbox"
}| Field | Type | Default | Description |
|---|---|---|---|
imap.server |
string | imap.gmail.com |
IMAP server hostname |
imap.port |
int | 993 |
IMAP TLS port |
imap.username |
string | (required) | Your email address |
imap.password_cmd |
string | (required) | Shell command that prints IMAP password |
outbox_dir |
string | outbox |
Directory for downloaded PDFs |
~/.config/uber-exporter/cookie.txt:
A single line containing your Uber browser cookies (see Step 5 above).
"IMAP username not configured" — You haven't created the config file
or username is empty. See Step 3.
"no password_cmd configured" — Add password_cmd to your config.
See Step 3.
"IMAP login: … AUTHENTICATIONFAILED" — Wrong password or you need a Gmail app password (not your regular password). See Step 4.
"got HTML instead of PDF" — Your Uber cookies have expired. Re-export them from your browser. See Step 5.
"No Uber receipt emails found" — The tool searches the last 3 months
of [Gmail]/All Mail for emails from uber.com containing "receipt".
Make sure your Uber receipt emails exist in that timeframe.
PUBLIC DOMAIN
Use it however you like.