yudax42 / askai

Command Line Interface for OpenAi ChatGPT
http://chat.openai.com/
86 stars 7 forks source link

"ChatGPT invalid clearance token" #6

Closed bwright2810 closed 1 year ago

bwright2810 commented 1 year ago

Hi, thanks for your work on this.

I'm not sure if this is related to https://github.com/yudax42/askai/issues/5, but after inputting my token using askai login I get the "successful" message, but any future query fails and gives me this error message:

ChatGPT invalid clearance token

Am I doing something wrong or does this appear to be a new issue?

bwright2810 commented 1 year ago

Also, I'm not sure if it has to do with the type of account or not - I'm just on the Open AI free tier.

yudax42 commented 1 year ago

Hi @bwright2810, OpenAI implemented additional protections through Cloudflare to enhance security for the unofficial API. This may have caused the error you encountered. To use the API, you will need to obtain and use a valid OpenAI "session token" and Cloudflare "clearance token." Please make sure you have updated your CLI to the latest version and refer to the readme for guidance on how to obtain these tokens. Thank you for your understanding.

andyDoucette commented 1 year ago

Thanks for working on this. I downloaded the latest version and followed the instructions on the latest readme and when I run askai live I still get ChatGPT failed to refresh auth token. Error: 403 Forbidden. Bummer!

Just to be clear, I am pasting in this order:

  1. __Secure-next-auth.session-token
  2. cf_clearance
bwright2810 commented 1 year ago

After circling back on this I can confirm I'm having the same issue ^.