X Bookmarks Integration
Enable X OAuth sync in self-hosted Arivu with required app settings, scopes, and runtime validation steps.
Arivu supports importing X bookmarks through server-side OAuth + API sync.
Prerequisites
- X Developer app with OAuth 2.0 enabled
- Confidential client credentials (
client_id,client_secret) - Public app URL where users can complete OAuth callback
Required X App Settings
In X Developer Portal:
- App type:
Web App - OAuth callback URL:
https://your-domain.example/settings?section=connections - Scopes:
bookmark.readtweet.readusers.readoffline.access
Arivu Environment Variables
Set in .env:
X_INTEGRATION_ENABLED=true
X_CLIENT_ID=your_x_client_id
X_CLIENT_SECRET=your_x_client_secret
# Optional override (defaults to {APP_URL}/settings?section=connections)
X_REDIRECT_URI=https://your-domain.example/settings?section=connections
# Optional sync caps
X_MAX_BOOKMARK_PAGES=10
X_MAX_BOOKMARKS=300
Restart backend after changes:
docker compose -f docker-compose.prod.yml up -d backend
Validate Integration
- Open Arivu Settings -> Connections
- Click
Connect X - Complete OAuth consent
- Confirm connected account metadata appears
- Click
Sync Bookmarks - Verify imported items in dashboard
Operational Notes
- Sync status values include
idle,syncing,auth_expired,rate_limited,error - Dedup uses both
x_tweet_idand normalized URL - Sync limits can be relaxed by setting caps to
0where supported
Troubleshooting
X integration disabled
X_INTEGRATION_ENABLEDisfalse- Backend was not restarted after env change
OAuth callback fails
- Redirect URI mismatch between X app and Arivu
- Invalid client credentials
- State expired due long delay before callback completion
Sync runs but imports nothing
- No new bookmarks in X account
- Existing imports already deduplicated
- Sync cap reached in prior run
Reference Files
backend/server.pyfrontend/src/components/settings/ConnectionsSection.jsx.env.example