n/aiu/Foch0x97 · 4 个月前
注册 登录
n/ai · 4 个月前 · 已编辑 · 642 次浏览
u/Foch0x97黄金

[7.5 14:30] 可用K12 team自动拉取

outlook

这部分内容登录后可见

gmail

这部分内容登录后可见

拉取脚本
fetch("https://chatgpt.com/api/auth/session", {
method: "GET",
credentials: "include"
})
.then(response => response.json())
.then(sessionData => {
const accessToken = sessionData.accessToken;

if (!accessToken) {
  throw new Error("未能获取到 accessToken");
}

console.log("获取到 accessToken,正在发送邀请请求...");

return fetch("https://chatgpt.com/backend-api/accounts/7bf3a2ce-3298-40b0-ac9b-3c922a5a91a6/invites/request", {
  method: "POST",
  headers: {
    "accept": "*/*",
    "accept-language": "en-US,en;q=0.9",
    "authorization": `Bearer ${accessToken}`, 
    "cache-control": "no-cache",
    "oai-language": "en-US",
    "pragma": "no-cache",
    "sec-ch-ua-arch": "\"x86\"",
    "sec-ch-ua-bitness": "\"64\"",
    "sec-ch-ua-mobile": "?0",
    "sec-ch-ua-model": "\"\"",
    "sec-ch-ua-platform": "\"macOS\"",
    "sec-ch-ua-platform-version": "\"13.5.1\"",
    "sec-fetch-dest": "empty",
    "sec-fetch-mode": "cors",
    "sec-fetch-site": "same-origin"
  },
  referrer: "https://chatgpt.com/k12-verification",
  referrerPolicy: "strict-origin-when-cross-origin",
  body: null,
  mode: "cors",
  credentials: "include"
});

})
.then(response => response.json())
.then(result => {
console.log("邀请请求成功:", result);
})
.catch(error => {
console.error("请求失败:", error);
});

6
11
登录后参与讨论。

11 条回复

排序
  1. chenshui 黄金 4 个月前

    这东西不是整半天 然后一会就没了吗

    0
  2. CyanYuki 白银 4 个月前

    哪用整半天,脚本 1 分钟整 3 个号,codex 够用了

    1
  3. le_vo 黄金 4 个月前

    thanks

    0
  4. Smesut 黄金 4 个月前

    谢谢

    0
  5. na_lu 黄金 4 个月前

    感谢提供

    0
  6. kun_tao 白银 4 个月前

    重复弄,重复停用,重复封,有能用时间长的吗

    0
  7. youtoo1028 白银 4 个月前

    大佬牛逼

    0
  8. StevenYoung 白银 4 个月前

    不能sub2api吗

    0
  9. bluenight 白银 4 个月前

    谢谢

    0
  10. macna40 白银 4 个月前

    感谢老板!

    0
  11. zhojin 黄金 4 个月前

    gpt自由!

    0