Request Failed from NodeJS

Hi all,

I have been successfully using OpenAI in my project, but I was using simple vanilla JS client-side. I’m now moving my OpenAI requests to the backend - into NodeJS and my calls to the API now fail every time with a 401 error - unauthorized.

I’m using the same credentials as before and even the same prompt.

I’m using axios to make the API call. Can anyone help please?

Many thanks

Please ignore this because I’m an idiot.

I copy-pasted my API key incorrectly!

Here’s a tip for anyone with similar issues: don’t copy-paste you API key incorrectly!