绕过限制升级ChatGPT Plus
async function fetchToken() {
try {
const response = await fetch('/api/auth/session');
if (!response.ok) throw new Error(${response.status} ${response.statusText});
const responseData = await response.json();
const { accessToken } = responseData;
return accessToken;
} catch (error) {
console.error('session 获取过程中出现错误', error);
}
}
async function fetchUrl(token) {
try {
const response = await fetch('/backend-api/payments/checkout', {
method: 'POST',
headers: {
// 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; rv:109.0) Gecko/20100101 Firefox/119.0', // 默认使用浏览器的 UA
'Authorization': Bearer ${token}
},
redirect: 'follow',
referrerPolicy: 'no-referrer'
});
if (!response.ok) throw new Error(${response.status} ${response.statusText});
const urlObject = await response.json();
return urlObject;
} catch (error) {
console.error('跳转过程中出现错误', error);
}
}
(async () => {
const token = await fetchToken();
if (token) {
const urlObject = await fetchUrl(token);
if (urlObject && urlObject.url) {
window.open(urlObject.url, '_blank'); // 在新标签页中打开 URL
}
}
})();
隔壁也有个差不多的,控制台粘贴回车即可:
绑定
绑定
