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] Error: ChatGPT failed to refresh auth token. Error: 403 Forbidden #4

Closed
9amcoder opened this issue Dec 13, 2022 · 11 comments
Closed

Comments

@9amcoder
Copy link

After copy and paste the Clearance Token, Session Token and User Agent.
I got 403 error.

Screenshot 2022-12-13 at 12 47 02 PM

@timkmecl
Copy link
Owner

This is currently an issue for some users (see this discussion for more) caused by some for now unidentified problem in the way chatgpt-api communicates with server that will hopefully soon be solved. Therefore if you exactly followed the instructions from README, there is unfortunately nothing I can do for now, I will notify you once the solution is found and implemented.

For now, could you please tell me the operating system, browser and exact user-agent you are using? This may help us find something.

If anyone knows what is going on (here and in the thread linked), please let me know and I will fix it ASAP.

@delicacyyy
Copy link

This is currently an issue for some users (see this discussion for more) caused by some for now unidentified problem in the way chatgpt-api communicates with server that will hopefully soon be solved. Therefore if you exactly followed the instructions from README, there is unfortunately nothing I can do for now, I will notify you once the solution is found and implemented.

For now, could you please tell me the operating system, browser and exact user-agent you are using? This may help us find something.

If anyone knows what is going on (here and in the thread linked), please let me know and I will fix it ASAP.

Please tell me how to get vsix file after yarn package

@timkmecl
Copy link
Owner

timkmecl commented Dec 14, 2022

It looks like this problem is not limited to this project, but also to some other ones using chatgpt-api, probably caused by agressive CloudFlare protection. In my own testing, even when I tried to login to my account in Chrome right after using it inside Edge, I got a 403 error inside the web version. After I waited for several minutes and tried again, it disappeard, but this shows that the problem is not just with the javascript API.

The browser that you use for getting the tokens might influence the chance to get 403, especially chrome, so maybe try from another one (transitive-bullshit/agentic#107 (comment))

There might also be some account or IP flagging going on either by OpenAI or CloudFlare that increases the possibility of getting 403 especially if doing lots of requests often (transitive-bullshit/agentic#96 (comment))

I am currently working on upgrading the login method for the extension to include an option to login using email and password, which will hopefully help solve this, will update you all then. In the meantime, if anyone learns something new about this, feel free to post it here!

Update:

It seems like using Chrome to obtain the tokens is what is causing (most of?) these issues (see this, this). So if you have 403 Error despite following the instructions, try using a browser other than Chrome!

I will update the README to include this info.

@eshack94
Copy link

Same issue here.

@ibiscp
Copy link

ibiscp commented Dec 28, 2022

Same error using Firefox and Brave

@brzka
Copy link

brzka commented Jan 1, 2023

Can confirm that the 403 error is coming up with Firefox.

@TimPickup
Copy link

Same using other browsers

@timkmecl
Copy link
Owner

timkmecl commented Jan 3, 2023

Hi, thank you all for sharing the issue. It seems that OpenAI's Clodflare protection has become more agressive, so the extension may no longer work for some users (only return 403/429 errors). There is unfortunately nothing I can do for the moment, but I will update it when/if there is a solution.

@mohammad-oghli
Copy link

Check this thread from this link for the only workaround for the issue.

@timkmecl
Copy link
Owner

timkmecl commented Feb 1, 2023

This should now be solved in the latest version, download it from Marketplace

New version uses a method described in this tweet (simple Node.js implementation here), already implemented in the unofficial chatgpt api. Only the official API key from OpenAI needed.

@timkmecl timkmecl closed this as completed Feb 1, 2023
@radiowave21
Copy link

Encountered the same issue with v1.1.10, using MS Edge.

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

9 participants