Note
本仓库是 TheNetsky/Microsoft-Rewards-Script 的 fork(维护分支 v4,由 @asbdfzcg 维护)。相比上游,本分支额外增加了 RewardsManager 图形化管理程序、autorun 一键运行工具 与 中文本地化,具体说明见下方列表。
- RewardsManager 图形化管理程序(
manager/):首次启动自动检测运行环境(Node.js / 依赖node_modules/ 构建产物dist/ 浏览器内核 / 配置文件),提供一键安装依赖与浏览器、计划任务管理、版本更新检查。 - autorun 一键运行工具(
autorun/):通过 Windows 计划任务每日自动运行脚本,内含诊断脚本与一键安装脚本,适合不熟悉命令行的 Windows 用户开箱即用。 - 中文本地化:搜索词与运行时输出信息已中文化,更适合中文用户直接使用。
Important
本项目在开发过程中使用了 AI 辅助编程(代码生成、调试与文档优化)。
脚本核心能力(Bing / Microsoft Rewards 自动任务)与上游保持一致,并已做中文本地化。下方为上游原版 README,配置项、使用方法等请以原文为准。
Tip
This version supports the new, modern Bing Rewards dashboard only - it does not support the legacy dashboard. If your account still uses the old dashboard, use the v3 branch and v3.x releases instead!
Use at your own risk - some features may not work as expected.
- Microsoft Rewards Script
Requirements: Node.js >= 24 and Git
Works on Windows, Linux, macOS, and WSL.
git clone https://github.com/TheNetsky/Microsoft-Rewards-Script.git
cd Microsoft-Rewards-ScriptOr, download the latest release ZIP and extract it.
- Copy and rename
env.exampleto.envand add your account credentials:
ACCOUNT_1_EMAIL=email@example.com
ACCOUNT_1_PASSWORD=your_passwordNote
Add one ACCOUNT_N_* block per account. Account slots do not need to be contiguous: ACCOUNT_2 or ACCOUNT_4 can be configured even when earlier slots are missing. Accounts run in ascending slot order. Optional per-account fields cover recovery email, locale, language, proxy, and fingerprint persistence - see env.example for all of them.
ACCOUNT_N_LANG_CODE accepts a BCP 47 language tag such as nl, it, or pt-BR. ACCOUNT_N_GEO_LOCALE accepts a two-letter country code or defaults to auto. The selected language and country are applied consistently to browser fingerprints, Accept-Language, Microsoft Rewards app headers, and market-specific requests. In auto mode, the country reported by the Microsoft profile is cached after the first successful dashboard request; changing either locale setting automatically replaces an incompatible saved fingerprint.
Tip
For 2FA accounts, set ACCOUNT_N_TOTP_SECRET and the script will generate and enter the 6-digit code automatically. To get the secret: in your Microsoft Security settings open 'Manage how you sign in', add an Authenticator app, and when the QR code appears choose 'enter code manually' - use that code as the value in your .env.
Warning
You must rebuild your script after making any changes to the .env.
Warning
Do not skip this step if you are running the script bare metal.
- Bare metal: Copy or rename
config.example.jsontoconfig.json(in the project root) and customize your preferences. - Docker: A valid
config.jsonis automatically created on first run and saved locally to./config/. You can optionally manually create aconfig.json(e.g., if you need to specify regex values) using the providedconfig.example.json
Caution
Prior versions of accounts.json and config.json are not compatible with current release.
npm run pre-build
npm run build
npm run start- Copy the sample
compose.yaml - Copy and rename
env.exampleto.envand add your account credentials:
ACCOUNT_1_EMAIL=email@example.com
ACCOUNT_1_PASSWORD=your_password- Review
compose.yamlto adjust scheduling, timezone, and config options.
Note
A valid config.json is auto-generated on first run using default values, and saved locally to ./config/.
Optionally, use CONFIG_* variables in the environment: section of the compose.yaml to customise your options (e.g., clusters, webhook, etc.).
A full list of available options are in the table below.
CONFIG_* variables are applied on every startup and always take precedence over ./config/config.json.
Tip
If a new image adds config options you're missing, a warning will appear in the container logs.
To update, delete ./config/config.json and restart - a fresh one will be generated from the latest example, with your compose.yaml overrides re-applied.
- Start the container:
docker compose up -d
Tip
Monitor logs with docker logs microsoft-rewards-script, useful for viewing passwordless login codes or diagnosing issues.
You can also enable a webhook in compose.yaml for notifications.
The optional Control API lets a local dashboard or another trusted tool monitor and control the script over HTTP. See the complete Control API documentation for setup, authentication, every endpoint, request fields, response examples, and security guidance.
Common uses include:
- checking API health and the current run state with
GET /healthandGET /status; - reading live points, logs, errors, account summaries, run history, and error diagnostics;
- listing safe stored-session metadata and deleting the mobile/desktop sessions for one account;
- starting all accounts with
POST /startand an empty JSON body; - running only one account with
POST /startand{"accountIndex":2}; - running all accounts except selected slots with
POST /startand{"excludedAccountIndexes":[2,4]}; - stopping or restarting a run with
POST /stoporPOST /restart; - streaming live logs and status updates from
GET /eventsusing Server-Sent Events (SSE); - reading the active configuration and schedule, with config and schedule
changes available only when their explicit
API_ALLOW_*options are enabled.
For example, start only ACCOUNT_2 with cURL:
curl --request POST \
--url http://127.0.0.1:3010/start \
--header 'Authorization: Bearer YOUR_API_TOKEN' \
--header 'Content-Type: application/json' \
--data '{"accountIndex":2}'For a ready-made web interface, use the supported and endorsed Rewards Dashboard. It connects to this Control API to manage runs, accounts, schedules, logs, points, and related script settings.
If using Nix: bash scripts/nix/run.sh
Edit config.json to customize behavior, or set CONFIG_* environment variables in compose.yaml (Docker). Below are all currently available options.
Warning
Rebuild the script (bare metal), or recreate the container (Docker) after all config changes.
| Setting | Type | Default | Description | Docker environment variable |
|---|---|---|---|---|
sessionPath |
string | "sessions" |
Directory to store browser sessions | |
headless |
boolean | false |
Run browser invisibly | Always true in Docker |
clusters |
number | 1 |
Number of concurrent account clusters | CONFIG_CLUSTERS |
errorDiagnostics |
boolean | false |
Save error and unknown-login page diagnostics under diagnostics/ |
CONFIG_ERROR_DIAGNOSTICS |
ensureStreakProtection |
boolean | true |
Ensure streak protection is enabled | CONFIG_ENSURE_STREAK_PROTECTION |
autoClaimPunchcardRewards |
boolean | false |
Auto-claim completed punchcard rewards | CONFIG_AUTO_CLAIM_PUNCHCARD_REWARDS |
skipNonPointTasks |
boolean | true |
Skip tasks that award no points | CONFIG_SKIP_NON_POINT_TASKS |
accountDelay.min |
string | "1min" |
Minimum delay before starting the next configured account | CONFIG_ACCOUNT_DELAY_MIN |
accountDelay.max |
string | "3min" |
Maximum delay before starting the next configured account | CONFIG_ACCOUNT_DELAY_MAX |
searchOnBingLocalQueries |
boolean | false |
Use the local query list for ExploreOnBing | CONFIG_SEARCH_ON_BING_LOCAL |
globalTimeout |
string | "30sec" |
Timeout for all actions | CONFIG_GLOBAL_TIMEOUT |
| Setting | Type | Default | Description | Docker environment variable |
|---|---|---|---|---|
workers.doDailySet |
boolean | true |
Complete daily set | CONFIG_WORKER_DAILY_SET |
workers.doClaimBonusPoints |
boolean | true |
Claim bonus points | CONFIG_WORKER_CLAIM_BONUS_POINTS |
workers.doMorePromotions |
boolean | true |
Complete "more activities" | CONFIG_WORKER_MORE_PROMOTIONS |
workers.doPunchCards |
boolean | true |
Complete punchcards | CONFIG_WORKER_PUNCH_CARDS |
workers.doAppPromotions |
boolean | true |
Complete app promotions | CONFIG_WORKER_APP_PROMOTIONS |
workers.doDesktopSearch |
boolean | true |
Perform desktop searches | CONFIG_WORKER_DESKTOP_SEARCH |
workers.doMobileSearch |
boolean | true |
Perform mobile searches | CONFIG_WORKER_MOBILE_SEARCH |
workers.doBonusSearches |
boolean | false |
Farm bonus searches beyond the cap | CONFIG_WORKER_BONUS_SEARCHES |
workers.doDailyCheckIn |
boolean | true |
Complete daily check-in | CONFIG_WORKER_DAILY_CHECKIN |
workers.doReadToEarn |
boolean | true |
Complete Read-to-Earn | CONFIG_WORKER_READ_TO_EARN |
workers.doActivateSearchPerk |
boolean | true |
Activate the "search Nx more" perk when present (runs after the daily set) | CONFIG_WORKER_ACTIVATE_SEARCH_PERK |
workers.doVisualSearch |
boolean | false |
Activate the visual-search streak and perform visual searches | CONFIG_WORKER_VISUAL_SEARCH |
| Setting | Type | Default | Description | Docker environment variable |
|---|---|---|---|---|
activities.urlReward |
boolean | true |
Complete URL reward activities | CONFIG_ACTIVITY_URL_REWARD |
activities.searchOnBing |
boolean | true |
Complete ExploreOnBing offers | CONFIG_ACTIVITY_SEARCH_ON_BING |
| Setting | Type | Default | Description | Docker environment variable |
|---|---|---|---|---|
searchSettings.scrollRandomResults |
boolean | false |
Scroll randomly on results | CONFIG_SEARCH_SCROLL_RANDOM |
searchSettings.clickRandomResults |
boolean | false |
Click random links | CONFIG_SEARCH_CLICK_RANDOM |
searchSettings.runOnZeroPoints |
boolean | false |
Run searches even when no search points remain | CONFIG_SEARCH_RUN_ON_ZERO_POINTS |
searchSettings.maxBonusSearches |
number | 110 |
Max bonus searches per run (when doBonusSearches is on) |
CONFIG_SEARCH_MAX_BONUS_SEARCHES |
searchSettings.parallelSearching |
boolean | true |
Run searches in parallel | CONFIG_SEARCH_PARALLEL |
searchSettings.clusterSearch |
boolean | true |
Cluster each main topic with Bing suggestions | CONFIG_SEARCH_CLUSTER |
searchSettings.queryEngines |
string[] | see Query sources | Sources used to build the search query pool | CONFIG_SEARCH_QUERY_ENGINES * |
searchSettings.searchResultVisitTime |
string | "10sec" |
Time to spend on each search result | CONFIG_SEARCH_VISIT_TIME |
searchSettings.searchDelay.min |
string | "30sec" |
Minimum delay between searches | CONFIG_SEARCH_DELAY_MIN |
searchSettings.searchDelay.max |
string | "1min" |
Maximum delay between searches | CONFIG_SEARCH_DELAY_MAX |
searchSettings.readDelay.min |
string | "30sec" |
Minimum delay for reading | CONFIG_SEARCH_READ_DELAY_MIN |
searchSettings.readDelay.max |
string | "1min" |
Maximum delay for reading | CONFIG_SEARCH_READ_DELAY_MAX |
Note
* Docker CONFIG_* array values are comma-separated strings e.g. "error,warn". Regex patterns must be set directly in config.json.
searchSettings.queryEngines controls where the main search topics come from. Pick any combination; topics from all selected sources are pooled and de-duplicated. When searchSettings.clusterSearch is enabled, each main topic is expanded on demand with Bing suggestions, that topic cluster is shuffled and completed, and only then does searching move to the next main topic.
Core sources:
| Selector | Source |
|---|---|
google |
Google Trends (trending searches) |
wikipedia |
Wikipedia most-read articles (previous day) |
wikirandom |
Random Wikipedia articles |
hackernews |
Hacker News front-page stories |
reddit |
Reddit r/popular post titles |
local |
Bundled src/functions/search-queries.json list |
RSS feeds use a dotted path - rss for every feed, rss.<site> for a whole site, or rss.<site>.<endpoint> for a single feed:
| Selector | Feeds |
|---|---|
rss.googleTrends |
Google Trends RSS (gb, us) |
rss.googleNews |
Google News (gb, us, world, technology, business) |
rss.bbc |
BBC News (top, world, technology, business, science) |
rss.guardian |
The Guardian (international, world, technology) |
rss.theVerge |
The Verge (all) |
rss.arsTechnica |
Ars Technica (all) |
rss.reddit |
Reddit listing feeds (popular, worldnews, technology) |
Add your own feeds in src/constants/rssFeeds.ts.
Default:
[
"google",
"wikipedia",
"wikirandom",
"hackernews",
"reddit",
"local",
"rss.googleTrends",
"rss.googleNews",
"rss.bbc",
"rss.guardian.world",
"rss.theVerge.all"
]Opt-in features that may change. Disabled by default.
| Setting | Type | Default | Description | Docker environment variable |
|---|---|---|---|---|
experimental.apiSearch |
boolean | false |
Perform Bing searches over HTTP instead of driving a browser page | CONFIG_EXPERIMENTAL_API_SEARCH |
experimental.apiSearchOnBing |
boolean | false |
Complete ExploreOnBing offers over HTTP instead of the browser | CONFIG_EXPERIMENTAL_API_SEARCH_ON_BING |
Note
The API paths are faster but depend on the modern dashboard's endpoints. If an ExploreOnBing offer ever fails to be credited, turn apiSearchOnBing off to fall back to the browser path.
Regardless of the experimental search settings, normal Rewards actions use the cookies and action data captured during bootstrap without refreshing the visible page. The browser remains idle until a browser-backed search starts. A failed or unacknowledged URL-reward request triggers one context refresh and one retry; successful requests use the balance returned by the server action.
| Setting | Type | Default | Description | Docker environment variable |
|---|---|---|---|---|
debugLogs |
boolean | false |
Enable debug logging | CONFIG_DEBUG_LOGS |
consoleLogFilter.enabled |
boolean | false |
Enable console log filtering | CONFIG_LOG_FILTER_ENABLED |
consoleLogFilter.mode |
string | "whitelist" |
Filter mode (whitelist/blacklist) | CONFIG_LOG_FILTER_MODE |
consoleLogFilter.levels |
string[] | ["error", "warn"] |
Log levels to filter | CONFIG_LOG_FILTER_LEVELS * |
consoleLogFilter.keywords |
string[] | ["starting account"] |
Keywords to filter | CONFIG_LOG_FILTER_KEYWORDS * |
consoleLogFilter.regexPatterns |
string[] | [] |
Regex patterns for filtering |
Note
* Docker CONFIG_* array values are comma-separated strings e.g. "error,warn". Regex patterns must be set directly in config.json.
| Setting | Type | Default | Description | Docker environment variable |
|---|---|---|---|---|
proxy.queryEngine |
boolean | true |
Proxy query engine requests | CONFIG_PROXY_QUERY_ENGINE |
| Setting | Type | Default | Description | Docker environment variable |
|---|---|---|---|---|
webhook.discord.enabled |
boolean | false |
Enable Discord webhook | CONFIG_DISCORD_ENABLED |
webhook.discord.url |
string | "" |
Discord webhook URL | CONFIG_DISCORD_URL |
webhook.telegram.enabled |
boolean | false |
Enable Telegram webhook | CONFIG_TELEGRAM_ENABLED |
webhook.telegram.botToken |
string | "" |
Telegram bot token | CONFIG_TELEGRAM_BOTTOKEN |
webhook.telegram.chatId |
string | "" |
Telegram chat id | CONFIG_TELEGRAM_CHATID |
webhook.ntfy.enabled |
boolean | false |
Enable ntfy notifications | CONFIG_NTFY_ENABLED |
webhook.ntfy.url |
string | "" |
ntfy server URL | CONFIG_NTFY_URL |
webhook.ntfy.topic |
string | "" |
ntfy topic | CONFIG_NTFY_TOPIC |
webhook.ntfy.token |
string | "" |
ntfy authentication token | CONFIG_NTFY_TOKEN |
webhook.ntfy.title |
string | "Microsoft-Rewards-Script" |
Notification title | CONFIG_NTFY_TITLE |
webhook.ntfy.tags |
string[] | ["bot", "notify"] |
Notification tags | CONFIG_NTFY_TAGS * |
webhook.ntfy.priority |
number | 3 |
Notification priority (1-5) | CONFIG_NTFY_PRIORITY |
webhook.webhookLogFilter.enabled |
boolean | false |
Enable webhook log filtering | CONFIG_WEBHOOK_LOG_FILTER_ENABLED |
webhook.webhookLogFilter.mode |
string | "whitelist" |
Filter mode (whitelist/blacklist) | CONFIG_WEBHOOK_LOG_FILTER_MODE |
webhook.webhookLogFilter.levels |
string[] | ["error"] |
Log levels to send | CONFIG_WEBHOOK_LOG_FILTER_LEVELS * |
webhook.webhookLogFilter.keywords |
string[] | ["starting account", "select number", "collected"] |
Keywords to filter | CONFIG_WEBHOOK_LOG_FILTER_KEYWORDS * |
webhook.webhookLogFilter.regexPatterns |
string[] | [] |
Regex patterns for filtering |
Note
* Docker CONFIG_* array values are comma-separated strings e.g. "error,warn". Regex patterns must be set directly in config.json.
Warning
NTFY users set the webhookLogFilter to enabled, or you will receive push notifications for all logs.
When enabled, only account start, 2FA codes, and account completion summaries are delivered as push notifications.
Customize which notifications you receive with the keywords options.
Tip
Most login issues can be fixed by deleting your /sessions folder, and redeploying the script
The session utility requires an explicit command, so running it without an argument only displays help and never deletes anything.
# List stored mobile and desktop sessions
npm run clear-sessions -- list
# Delete the sessions belonging to one account
npm run clear-sessions -- email user@example.com
# Delete every stored session
npm run clear-sessions -- all# List safe session metadata
curl --request GET \
--url http://127.0.0.1:3010/sessions \
--header 'Authorization: Bearer YOUR_API_TOKEN'
# Delete only user@example.com's mobile and desktop sessions
curl --request DELETE \
--url http://127.0.0.1:3010/sessions/user%40example.com \
--header 'Authorization: Bearer YOUR_API_TOKEN'See the Control API session documentation for response data, Axios examples, and error behavior.
Use at your own risk.
Automation of Microsoft Rewards may lead to account suspension or bans.
This software is provided for educational purposes only.
The authors are not responsible for any actions taken by Microsoft.