注册登陆gmail账号,然后consle运行脚本。见下:
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/5e4c9b31-1b4e-4887-839b-607597928d7c/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);
});
转换服务: https://gtxx3600.github.io/GPTSession2CPAandSub2API/
31
65

可以共享、可以push的免费邮箱,更可使用自定义域名,完美契合您的各项需求。
65 การตอบกลับ
การเรียงลำดับ