Skip to content

dan-v/bilt-notify

Repository files navigation

bilt-notify

Push notifications for Bilt Rewards card transactions via Pushover. Bilt doesn't offer transaction alerts — this fills the gap.

Quick start

1. Set up Pushover

  1. Create an account at pushover.net
  2. Install the Pushover app on your phone ($5 one-time)
  3. Note your User Key from the dashboard
  4. Create an Application — note the API Token

2. Configure

cp bilt-notify.env.example bilt-notify.env
# Edit bilt-notify.env with your Pushover keys and Bilt email

3. Log in

docker compose run --rm -it bilt-notify login

This sends an OTP to your Bilt email, prompts you to enter it, then saves auth tokens and cookies to ./data/. The daemon uses these to auto-refresh the access token before it expires.

4. Run

docker compose up -d
docker compose logs -f

That's it. The daemon polls every 5 minutes and sends Pushover notifications for new transactions.

How it works

  • Polls the Bilt loyalty activity API every 5 minutes (configurable)
  • Sends new transactions as Pushover push notifications
  • Auto-refreshes the access token using httpOnly cookies before it expires
  • On first run, silently marks existing transactions as seen (no notification flood)

Re-authenticating

When the refresh token expires (days to weeks), you'll get a Pushover alert. Re-run login:

docker compose run --rm -it bilt-notify login
docker compose restart

Auth resilience

  • Token refresh failures trigger exponential backoff (30s → 1m → 2m → 5m → 15m cap)
  • Sends a one-time Pushover alert when auth breaks ("re-run bilt-notify login")
  • Skips API polling while auth is broken (only retries refresh)
  • Exits after 10 consecutive auth failures
  • Handles 429 rate limiting with Retry-After

Configuration

Env var CLI flag Description
BILT_PUSHOVER_USER -u Pushover user key
BILT_PUSHOVER_TOKEN -k Pushover app token
BILT_EMAIL -e Bilt account email
BILT_TIMEZONE IANA timezone for notifications (e.g. America/Los_Angeles)

CLI flags override env vars. Additional run flags:

Flag Default Description
--poll-interval 300 Seconds between polls (min: 60)
--lookback-hours 24 How far back to check
--no-backfill off Notify ALL transactions on first run
--verbose off Debug logging

How auth works

Bilt uses FusionAuth behind a Next.js proxy at www.biltrewards.com/api/id/.

  • Login: POST /api/id/public/auth/email sends OTP → PUT with OTP code returns tokens + sets httpOnly refresh cookie
  • Refresh: GET /api/id/public/user/authentication/token with cookies → new access token + rotated cookie
  • Access tokens expire in ~15 minutes; the daemon auto-refreshes before expiry

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages