Closed opsec-warehouse closed 1 year ago
Found the issue. The problem was that revChatGPT was storing the configuration variables in a separate file on the user root and was ignoring the .env created in the root of chatGPT-discord-bot.
To fix, you'll want to grab the accessToken object from https://chat.openai.com/api/auth/session (post-authentication) and copy/paste it directly into the revChatGPT configuration file.
The cached revChatGPT configuration can be found at ~/.config/revChatGPT/cache.json
There's either a bug with the code directly (which I can't find) or I'm configuring the local .env incorrectly.
Upon attempting to utilize the UNOFFICIAL API, I define the PUID and ACCESS_TOKEN in .env, and then attempt to start the server; this is the error I get:
When extracting the PUID and ACCESS_CODE, the instructions on the readme.md were unclear, so I attempted to paste both URL-encoded and URL-decoded and neither have worked. To my knowledge, the _puid cookie in chat.openai.com uses this syntax:
user-o0kexO6gM8pM3q6nM5kS5rFB:4414848814-RhkCCWNEU8iIBm1wHA==
split apart, it seems to be a 24-char user identifier "user-o0kexO6gM8pM3q6nM5kS5rFB", trailed by another 10-digit ID of some sort "4414848814", and ultimately followed by an encrypted object that's been base64 encoded.
Does this entire PUID need to be added in the .env while URL-encoded or decoded, and what sections (or all?) of the PUID are to be added to the config?