Open AI did change my API key and now projects are not working

Hello, I tried to upload my chatbot that i have created on my git and Open AI took it down and changed my API. Now with this new API, I cannot run my projects successfully. My code gives me an error saying that I do not have access, even though I am the only person in the organization and I do have access. Is there something else I need to do with this new API?

OpenAI will scan for leaked keys in client applications and code sites, and revoke the key if it is detected.

You must keep your API keys absolutely secret, and treat them like a bank account password.

Secure practice is to use an environment variable on a server or local machine completely under your control, never hard-coding a key value. The OpenAI library client is designed to look for and use OPENAI_API_KEY. This ensures your code itself is not a vulnerability.

You’ll have to generate a new API key if one that was active was removed. The API error would be about sending an invalid key, not exactly a “your account has no access” message.

2 Likes