Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
kienmd opened this issue Dec 11, 2022 · 8 comments
Closed

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

kienmd opened this issue Dec 11, 2022 · 8 comments

Comments

@kienmd
Copy link

kienmd commented Dec 11, 2022

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

@gragland
Copy link
Owner

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
Copy link

if-ai commented Dec 20, 2022

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

@dwreski
Copy link

dwreski commented Jan 6, 2023

Yep - same problem here. Ugh.

@rico0610
Copy link

rico0610 commented Jan 9, 2023

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
Copy link
Contributor

sellenth commented Jan 9, 2023

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

@rico0610
Copy link

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

@willremor
Copy link

willremor commented Jan 11, 2023

@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
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants
@gragland @dwreski @willremor @if-ai @sellenth @rico0610 @kienmd and others