chatgpt-chrome-extension icon indicating copy to clipboard operation
chatgpt-chrome-extension copied to clipboard

Error: ChatGPT failed to refresh auth token. Error: 403 Forbidden

Open kienmd opened this issue 2 years ago • 5 comments

Being thrown this error, not sure if it is to do with new Cloudflare protections.

kienmd avatar Dec 11 '22 23:12 kienmd

Yeah looks like it's due to the new Cloudflare protection that OpenAI added. Will track the issue in this thread and then update the extension when there's a fix.

gragland avatar Dec 12 '22 00:12 gragland

I am writing the token manually in the .env SESSION_TOKEN= as soon as I log into chatgpt I go to the cookies and copy the secure auth token but stills shows the error even if I do the capcha manually any solutions or everyone is having the same problem even with manual? Because I did the transitive bs examples and they worked even if I had to do the capcha manually

$ node server.js

  • Connecting to ChatGPT(node:73316) ExperimentalWarning: The Fetch API is an experimental feature. This feature could ch ange at any time (Use node --trace-warnings ... to show where the warning was created) × Connecting to ChatGPT file:///E:/DB/ChatGPT/chatgpt-chrome-extension/node_modules/chatgpt/build/index.js:264 throw new Error(ChatGPT failed to refresh auth token. ${err.toString()}); ^

Error: ChatGPT failed to refresh auth token. Error: 403 Forbidden at ChatGPTAPI.refreshAccessToken (file:///E:/DB/ChatGPT/chatgpt-chrome-extension/node_modules/chatgpt/build/index.js :264:13) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async ChatGPTAPI.ensureAuth (file:///E:/DB/ChatGPT/chatgpt-chrome-extension/node_modules/chatgpt/build/index.js:2 30:12) at async oraPromise (file:///E:/DB/ChatGPT/chatgpt-chrome-extension/node_modules/ora/index.js:368:18) at async start (file:///E:/DB/ChatGPT/chatgpt-chrome-extension/server.js:36:3)

Node.js v18.12.1

if-ai avatar Dec 20 '22 15:12 if-ai

Yep - same problem here. Ugh.

dwreski avatar Jan 06 '23 15:01 dwreski

Same problem here:

Getting this error after adding the session token to .env file.

Error: ChatGPT failed to refresh auth token. Error: 403 Forbidden

rico0610 avatar Jan 09 '23 05:01 rico0610

Perhaps try my PR. Note that the .env.example has changed

sellenth avatar Jan 09 '23 07:01 sellenth

This works for me thanks. However, I found another cool extension, called Merlin.

rico0610 avatar Jan 10 '23 05:01 rico0610

@gragland

Yeah looks like it's due to the new Cloudflare protection that OpenAI added. Will track the issue in this thread and then update the extension when there's a fix.

@gragland Are you planning to update the code and readme based on changes made in the transitive-bs thread? I am still getting the same error message.

willremor avatar Jan 11 '23 12:01 willremor

Thanks @sellenth! Just merged your pull request and updated to the latest version of the library.

gragland avatar Jan 11 '23 16:01 gragland