timkmecl / chatgpt-vscode

VSCode extension that allows you to use ChatGPT or GPT4 inside the IDE

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[ERROR] Error: ChatGPT failed to refresh auth token. Error: 403 Forbidden

9amcoder opened this issue · comments

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

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.

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

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.

Same issue here.

Same error using Firefox and Brave

commented

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

Same using other browsers

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.

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

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.

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