{"repo":"daimon3332/Outlook-Oauth-GetToken","free":true,"listed":false,"github":"https://github.com/daimon3332/Outlook-Oauth-GetToken","clone":"git clone https://github.com/daimon3332/Outlook-Oauth-GetToken.git","description":"A standalone OAuth2 refresh_token retrieval tool for existing Outlook / Hotmail accounts. 面向已有 Outlook / Hotmail 账号的独立 OAuth2 refresh_token 获取工具","language":"Python","stars":118,"topics":["hotmail","microsoft","oauth2","outlook"],"license":null,"category":"auth-billing-email","readme_excerpt":"OutlookGetToken 给 已注册 但还没有 Graph refresh token 的 Outlook / Hotmail 账号，批量走一遍 OAuth2 授权，把 token 写入结果文件。 核心脚本： get refresh token.py （patchright 浏览器自动化 + 授权码换 token）。 相关项目 - OutlookRegister — 账号注册。 自动注册 Outlook / Hotmail 账号，并获取 Microsoft Graph OAuth2 refresh token 。 - OutlookManage — 账号管理。 用于导入、检测、刷新和管理已注册的 Outlook 账号及其 OAuth2 凭据。 --- 1. 如何使用 1.1 环境 代理软件需已启动（默认示例为本机 127.0.0.1:7890 ）。 1.2 准备配置与账号 首次使用： 编辑 not oauth2.txt ， 每行一个账号 ： 示例： - 以 # 开头的行视为注释，忽略 - 也兼容更长行（如已有 邮箱----密码----client id----token ）： 只取前两段 邮箱与密码 按需编辑 config.json （代理、并发等，见下一节）。 1.3 运行 成功后会 追加 写入 oauth2.txt ： 1.4 使用注意 - 工具会弹真实浏览器窗口（ headless=False ） - 不会 自动绑定/接码辅助邮箱；密码后的「保护帐户」页会点 暂时跳过 - 若已绑过辅助邮箱且弹出「验证你的电子邮件」，会点 使用密码 继续 - 出现 帐户已锁定 → 该号直接失败 - 同一账号多次成功会重复追加到输出文件，请自行去重 --- 2. config.json 配置 将 config.example.json 复制为 config.json 后修改： 2.1 顶层字段 字段 类型 说明 ------ ------ ------ input file string 输入文件名，默认 not oauth2.txt output file string 输出文件名，默认 oauth2.txt ， 追加 写入 concurrent number 并发浏览器数；实际为 min(concurrent, 账号数) proxy object 代理配置，见下表 2.2 proxy 字段 说明 ------ ------ mode single ：只用 single port ； multiple ：使用 port start ～ port end 端口池 type 代理协议，如 http 、 socks5 host 代理主机，常见 127.0.0.1 single port mode=single 时的端口 port start / port end mode=multiple 时的端口闭区间 max per proxy 单个端口在进程内最多被选中次数；用满后该端口暂不选，全满则重置计数再选 --- 3. 代码流程 入口： python get refresh token.py → main() 。 3.1 总览 3.2 单账号流程 3.3 密码之后的分支 保护帐户 / 锁定页都在输入密码之后。 页面 行为 ------ ------ 验证你的电子邮件 点「使用密码」 输入密码 填写并点「下一步」 让我们来保护你的帐户 点「暂时跳过」 帐户已锁定 直接失败 保持登录 点「否」 同意 / 已授权 点接受，或直接拿到 code --- 友情链接 - ","default_branch":null,"files":null,"tree":[],"storefront":"/r/daimon3332","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/daimon3332/Outlook-Oauth-GetToken/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}