gragland / chatgpt-chrome-extension

A ChatGPT Chrome extension. Integrates ChatGPT into every text box on the internet.
MIT License
2.85k stars 469 forks source link

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

Closed kienmd closed 1 year ago

kienmd commented 1 year ago

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

gragland commented 1 year ago

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.

if-ai commented 1 year ago

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

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

dwreski commented 1 year ago

Yep - same problem here. Ugh.

rico0610 commented 1 year ago

Same problem here:

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

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

sellenth commented 1 year ago

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

rico0610 commented 1 year ago

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

willremor commented 1 year ago

@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.

gragland commented 1 year ago

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