Zero6992 / chatGPT-discord-bot

Integrate ChatGPT into your own discord bot
GNU General Public License v2.0
2.6k stars 699 forks source link

This key is associated with a deactivated account. If you feel this is an error, contact us through our help center at help.openai.com #442

Closed Jellun closed 3 months ago

Jellun commented 11 months ago

Hi All,

I've got the following error. However, I'm 100% sure that my account is fine and the same OpenAI key is currently being used successfully in my own Python app. Anyone got any ideas why this would happen?

C:\Users\jye\Downloads\chatGPT-discord-bot-main>python3 main.py [2023-07-14 23:03:03] [INFO ] discord.client: logging in using static token [2023-07-14 23:03:05] [INFO ] discord.gateway: Shard ID None has connected to Gateway (Session ID: d465588f86c3db4a649f82b5ae22e388). ←[30;1m2023-07-14 23:03:07←[0m ←[34;1mINFO ←[0m ←[35msrc.log←[0m -> Send system prompt with size 31 ←[30;1m2023-07-14 23:03:07←[0m ←[31mERROR ←[0m ←[35msrc.log←[0m -> Error while sending system prompt: 401 Unauthorized { "error": { "message": "This key is associated with a deactivated account. If you feel this is an error, contact us through our help center at help.openai.com.", "type": "invalid_request_error", "param": null, "code": "account_deactivated" } } ←[31mTraceback (most recent call last): File "C:\Users\jye\Downloads\chatGPT-discord-bot-main\src\aclient.py", line 134, in send_start_prompt response = f"{response}{await responses.official_handle_response(self.starting_prompt, self)}" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\jye\Downloads\chatGPT-discord-bot-main\src\responses.py", line 8, in official_handle_response return await sync_to_async(client.chatbot.ask)(message) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\jye\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\asgiref\sync.py", line 448, in call ret = await asyncio.wait_for(future, timeout=None) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.1264.0_x64__qbz5n2kfra8p0\Lib\asyncio\tasks.py", line 442, in wait_for return await fut ^^^^^^^^^ File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.1264.0_x64__qbz5n2kfra8p0\Lib\concurrent\futures\thread.py", line 58, in run result = self.fn(*self.args, *self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\jye\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\asgiref\sync.py", line 490, in thread_handler return func(args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\jye\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\revChatGPT\V3.py", line 391, in ask full_response: str = "".join(response) ^^^^^^^^^^^^^^^^^ File "C:\Users\jye\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\revChatGPT\V3.py", line 244, in ask_stream raise t.APIConnectionError( revChatGPT.typings.APIConnectionError: 401 Unauthorized { "error": { "message": "This key is associated with a deactivated account. If you feel this is an error, contact us through our help center at help.openai.com.", "type": "invalid_request_error", "param": null, "code": "account_deactivated" } }

Please check if there is a problem with your network connection Please check that the input is correct, or you can resolve this issue by filing an issue Project URL: [https://github.com/acheong08/ChatGPT←[0m](https://github.com/acheong08/ChatGPT%E2%86%90%5B0m) ←[30;1m2023-07-14 23:03:08←[0m ←[34;1mINFO ←[0m ←[35msrc.log←[0m -> ChatGPT#6772 is now running!

Jellun commented 11 months ago

Here is my .env file below. I've tried two working OPENAI_API_KEYs, both were returned with "account_deactivated".

Discord Bot token https://discord.com/developers/applications

DISCORD_BOT_TOKEN=xxxxxx

Unofficial OpenAI ChatGPT authentication (only Plus acoount) # https://chat.openai.com/api/auth/session

PUID= ACCESS_TOKEN=

Official OpenAI API authentication

OPENAI_API_KEY=xxxxxx

Bard session_id(__Secure-1PSID)

BARD_SESSION_ID=

-----------------------

Optional setting

CHAT_MODEL option: OFFICIAL, UNOFFICIAL, Bard, Bing

CHAT_MODEL=OFFICIAL

GPT_ENGINE option: gpt-3.5-turbo, gpt-4

GPT_ENGINE=gpt-3.5-turbo LOGGING=True REPLYING_ALL=False

Channel using to send the starting-prompt

DISCORD_CHANNEL_ID=xxxxxx REPLYING_ALL_DISCORD_CHANNEL_ID=

Enable auto-login for Google Bard and Microsoft Bing to fetch cookies

Version of your chrome browser

chrome_version=

Add auto-login for Microsoft Bing, fill in your Microsoft Bing account and password

bing_enable_auto_login=False # True/False bing_account= bing_password=

Add auto-login for Google Bard, fill in your Microsoft Bing account and password

NOTICE!!! AUTO-LOGIN ONLY WORKS FOR GOOGLE ACCOUNT THAT DOES NOT HAVE 2FA

bard_enable_auto_login=False # True/False google_account= google_password=

-----------------------

Zero6992 commented 11 months ago

your account got banned, contact to OpenAI or open new account

Jellun commented 11 months ago

I'm still using my account as of today. Nothing is banned. Both web ChatGPT and API calls are still working. But I continue to get this error when running this discord bot. Can you please point me in the right direction?