It is worth reading the [authentication instructions](https://www.npmjs.com/package/chatgpt#usage) for the unofficial ChatGPT API.
Your user-agent and IP address must match from the real browser window you're logged in with to the one you're using for ChatGPTAPI. This means that you currently can't log in with your laptop and then run the bot on a server or proxy somewhere.
Cloudflare will still sometimes ask you to complete a CAPTCHA, so you may need to keep an eye on it and manually resolve the CAPTCHA.
You should not be using this ChatGPT account while the bot is using it, because that browser window may refresh one of your tokens and invalidate the bot's session.
If your OpenAI account uses Google Auth, you shouldn't encounter any of the more complicated Recaptchas — and can avoid using paid third-party CAPTCHA solving providers. To use Google auth, make sure your OpenAI account is using Google and then set `OPENAI_LOGIN_TYPE` to `google`. You should also note that if your Google account uses 2FA it will not work but there is a workaround detailed [here](https://github.com/transitive-bullshit/chatgpt-api/issues/169#issuecomment-1362206780)
To get an access token you can provide MATRIX_USERNAME and MATRIX_PASSWORD whilst leaving MATRIX_ACCESS_TOKEN blank. This will print a token to the screen. You can then add this token to the MATRIX_ACCESS_TOKEN field.