#API Key not being read from .env anymore.

1 messages · Page 1 of 1 (latest)

static wasp
#

Hey guys, I'm working on a project that SO FAR worked but all of a sudden stopped for some reason.

As of now I've read the API key from my .env file as such `const openai = new OpenAI({
apiKey: process.env.OPENAI_API_KEY,
});' But unfortunately it now returns me an "invalid key" code.

Ive tried pasting my API key in as a String directly and that works. So now im absolutely lost, as to what broke? Did the documentation change?

green iris