SkyBlue997/MicrosoftRewardsPilot
About
Self-hosted MicrosoftRewards engine, lightweight | 微软奖励自动答题搜索,多账号托管 | 自己ホスト型MicrosoftRewardsエンジン、軽量
Systems & InfrastructureMeasured star growth
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- Collecting history
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
docs/README_EN.md
OriginalMicrosoftRewardsPilot Automation Script
Intelligent Microsoft Rewards Points Auto-Collection Tool
Table of Contents
- Quick Start
- Main Configuration
- Troubleshooting & Testing
- Core Features
- Complete Configuration Example
- Important Warnings
Quick Start
Local Deployment (Click to expand)
# 1. Clone Repository
git clone https://github.com/SkyBlue997/MicrosoftRewardsPilot
cd MicrosoftRewardsPilot
# 2. Install dependencies and download the browser (requires Node.js 20 or newer)
npm run pre-build
# 3. Configuration
# Copy example configuration files and edit them
cp config/config.json.example config/config.json
cp config/accounts.json.example config/accounts.json
# 4. Build and Run
npm run build
npm start
Docker Deployment (Recommended) (Click to expand)
# 1. Prepare Configuration Files
# Copy example configuration files and edit them
cp config/config.json.example config/config.json
cp config/accounts.json.example config/accounts.json
# 2. Build the image and start the container (the image installs dependencies, downloads the browser and compiles by itself)
docker compose up -d --build
# 3. View Logs (Optional)
docker logs -f microsoftrewardspilot
Docker Compose Configuration Example:
services:
microsoftrewardspilot:
build: .
container_name: microsoftrewardspilot
restart: unless-stopped
volumes:
- ./config/accounts.json:/usr/src/microsoftrewardspilot/config/accounts.json
- ./config/config.json:/usr/src/microsoftrewardspilot/config/config.json
- ./sessions:/usr/src/microsoftrewardspilot/sessions # Persist login sessions
environment:
- NODE_ENV=production
- TZ=Asia/Tokyo # Set according to geographic location
- CRON_SCHEDULE=0 9,16,21 * * * # Prefer odd / non-round / spread-out hours instead of 9,16, to avoid hitting the same instant every day; run_daily.sh additionally layers on 3-85 min of random jitter
- RUN_ON_START=false # Keep false: otherwise every container start (Docker/host restart) runs the bot immediately, and restarts come in bursts — several sign-ins within minutes
# Anti-detection: enable rebrowser's Runtime.enable fix (src/rebrowser-env.ts already ships defaults; declared explicitly here for easy override)
- REBROWSER_PATCHES_RUNTIME_FIX_MODE=addBinding
- REBROWSER_PATCHES_UTILITY_WORLD_NAME=util
- The browser's timezone is always detected from the exit IP;
TZonly decides which timezone the container's schedule runs in.- Optional environment variable
REWARDS_APP_VERSION: the Bing app version stated when calling the Rewards API (defaults to a real release written in the code). The app ships about weekly, so set a newer version from time to time.
Main Configuration
Basic Settings
{
"headless": true, // Run in headless mode
"parallel": false, // Run desktop and mobile in parallel
"clusters": 1, // Number of clusters
"globalTimeout": "180min", // Time budget for one account's run
"accountDelay": { // Delay between accounts
"min": "8min", // Minimum delay 8 minutes
"max": "20min" // Maximum delay 20 minutes
}
}
Smart Search Configuration
Search spacing (log-normal delay) and human-like typing are built in; query language auto-localizes per account market (full query banks for ja/en/zh-CN/vi). Tunable keys:
{
"searchSettings": {
"multiLanguage": {
"enabled": true, // Multi-language support
"autoDetectLocation": true // Auto-detect location (drives query & timezone localization)
},
"autoTimezone": {
"enabled": true, // Auto timezone
"setOnStartup": true // Set on startup
}
}
}
Task Configuration
Other claimable activities (daily set, check-ins, read-to-earn, puzzles) are auto-claimed and need no toggle.
{
"workers": {
"doDesktopSearch": true, // Desktop search
"doMobileSearch": true, // Mobile search (Level 2+)
"doMorePromotions": true // Explore on Bing / promotional tasks
}
}
Popup Handling Configuration
{
"popupHandling": {
"enabled": false, // Enable popup handling (disabled by default)
"handleReferralPopups": true, // Handle referral popups
"handleStreakProtectionPopups": true,// Handle streak protection popups
"handleStreakRestorePopups": true, // Handle streak restore popups
"handleGenericModals": true, // Handle generic modals
"logPopupHandling": true // Log popup handling
}
}
Passkey Handling Configuration
{
"passkeyHandling": {
"enabled": true, // Enable Passkey handling
"maxAttempts": 5 // Maximum attempts
}
}
Troubleshooting & Testing
Sign-in Needs 2FA / Manual Verification
Problem: Scheduled runs get stuck at 2FA, a passkey prompt, "Stay signed in?" or a consent page (logs show Bing login verification failed, OAuth authorization timeout, etc.)
Solution: Run the interactive sign-in tool and complete the verification once in a visible browser
npm run login # desktop + mobile sessions
npm run login -- --mobile # mobile session only (or --desktop)
npm run login -- --email [email protected] # pick an account when there are several
How it works:
- Reads the account (including its proxy) from
config/accounts.jsonand opens a visible window with the same fingerprint/geo settings the scheduled runs use - Fills in email and password automatically; SMS/email codes are asked for in the terminal
- Anything the automation can't get past (2FA, passkey, consent, ...) you finish in the window; once it leaves Microsoft's sign-in pages the tool re-checks automatically (or press Enter in the terminal to check right away)
- Mints the OAuth token and reads the points balance; the session is saved to
sessions/<email>/only after that succeeds - Later scheduled runs reuse the session. For Docker, run it on the host (
./sessionsis mounted into the container) — no image rebuild needed
Popup Handling Issue
Problem: Program gets stuck in popup handling, infinite loop occurs
Symptoms: Log shows repeated popup detection info
[REWARDS-POPUP] 🎯 Detected Streak Protection Popup
[REWARDS-POPUP] 🎯 Detected Streak Protection Popup
Solution:
- Immediate fix: Disable popup handling in
config/config.json
{
"popupHandling": {
"enabled": false
}
}
- Selective enable: Only enable required popup types
{
"popupHandling": {
"enabled": true,
"handleReferralPopups": true,
"handleStreakProtectionPopups": false,
"handleStreakRestorePopups": false
}
}
Passkey Setup Loop Issue
Problem: After login, redirected to Passkey setup page, clicking "Skip for now" causes infinite loop
Symptoms: Program stuck after "Starting login process!"
Solution: System automatically handles Passkey loop issue
- Auto detection: Detect Passkey setup page
- Multiple bypasses: Skip button, ESC key, direct navigation
- Smart retry: Up to 5 attempts to prevent infinite loop
- Configurable: Adjust handling strategy via config
Config options:
{
"passkeyHandling": {
"enabled": true,
"maxAttempts": 5
}
}
Common Issues
Points Collection Limited/Automation Detected
Symptoms: Several searches in a row earn no points, or point collection looks incomplete Explanation: Most of the time this is NOT detection, but rather:
- Reward-day reset boundary (around local midnight): dapi returns an inconsistent snapshot (search/read counters flicker between "already reset" and "old value"). Don't run during this window — run at stable hours (e.g. the morning/evening cron of the script).
- Today's activities already done: a second run on the same day is usually +0 (the correct, idempotent behavior).
- If you really are throttled: reduce run frequency and avoid many quick logins in a short span; the built-in anti-detection (rebrowser patch, fingerprint consistency, log-normal delays) recovers with normal use.
Geo-location Detection Failure
Solution: Check network connection, ensure access to geo-location API services
Timezone Mismatch
Solution: The browser's timezone is detected from the exit IP and needs no setting; the TZ environment variable only affects when the container's scheduled runs fire, so make sure it is the timezone you want
Out of Memory
Solution: Restart container or check system resource usage
Docker Troubleshooting
# View logs
docker logs microsoftrewardspilot
# Test network connection
docker exec microsoftrewardspilot ping google.com
# Check geo-location (same service used by the code in GeoLanguage.ts)
docker exec microsoftrewardspilot curl -s https://ipapi.co/json
Core Features
Supported Tasks
|
Smart Features
|
Complete Configuration Example
See the repo's
config/config.json.examplefor the full template (Quick Start already had youcpit). Below lists only the keys that actually take effect:
Effective config keys (Click to expand)
{
"baseURL": "https://rewards.bing.com",
"sessionPath": "sessions",
"headless": true,
"parallel": false,
"clusters": 1,
"saveFingerprint": {
"mobile": true,
"desktop": true
},
"workers": {
"doDesktopSearch": true,
"doMobileSearch": true,
"doMorePromotions": true
},
"globalTimeout": "180min",
"accountDelay": {
"min": "8min",
"max": "20min"
},
"searchSettings": {
"multiLanguage": {
"enabled": true,
"autoDetectLocation": true
},
"autoTimezone": {
"enabled": true,
"setOnStartup": true,
"validateMatch": true,
"logChanges": true
}
},
"logExcludeFunc": [
"SEARCH-CLOSE-TABS"
],
"webhookLogExcludeFunc": [
"SEARCH-CLOSE-TABS"
],
"webhook": {
"enabled": false,
"url": ""
},
"popupHandling": {
"enabled": false,
"handleReferralPopups": true,
"handleStreakProtectionPopups": true,
"handleStreakRestorePopups": true,
"handleGenericModals": true,
"logPopupHandling": true
},
"passkeyHandling": {
"enabled": true,
"maxAttempts": 5
}
}
Important Warnings
Risk Warning Using automation scripts may result in account suspension
Safety Recommendations Use moderately, system has automatically enabled all anti-detection features
Regular Updates Keep the script updated to the latest version
Explore related projects
Loading…