Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions backup.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ function downloadJson(data) {
}

async function loadToken() {
const res = await fetch('https://chat.openai.com/api/auth/session');
const res = await fetch('https://chatgpt.com/api/auth/session');

if (!res.ok) {
throw new Error('failed to fetch token');
Expand All @@ -99,7 +99,7 @@ async function loadToken() {

async function getConversationIds(token, offset = 0) {
const res = await fetch(
`https://chat.openai.com/backend-api/conversations?offset=${offset}&limit=20`,
`https://chatgpt.com/backend-api/conversations?offset=${offset}&limit=20`,
{
headers: {
authorization: `Bearer ${token}`,
Expand All @@ -123,7 +123,7 @@ async function fetchConversation(token, id, maxAttempts = 3, attempt = 1) {
const BACKOFF_MULTIPLIER = 2;
try {
const res = await fetch(
`https://chat.openai.com/backend-api/conversation/${id}`,
`https://chatgpt.com/backend-api/conversation/${id}`,
{
headers: {
authorization: `Bearer ${token}`,
Expand Down