-
Notifications
You must be signed in to change notification settings - Fork 420
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Why can't my API be called? I'm pretty sure there's no problem with the API #32
Comments
You are probably passing a body that isn't a valid JSON with a request that probably speccifies 'application/json'. |
It might be that your API key doesn't have the right permissions as I got the similar error and it turned out from the logs from the terminal that I missed some permissions. Bad error messaging on the UI I would say from whoever wrote this code but here is the error log:
|
Hi I also got the errors above but saw that there is invalid api error when I look at the terminal. It seems that the problem might be that there is no code to read the api key in the .env file and to call the api? I tried inserting the api key under the original:
changed:
However, I would like to use the .env file(where i saved the api key) so that i do not paste the api key directly. I did this:
But it still returns the invalid api error and does not read the key? Pls send help :') |
@natalie230 Did you rename the .env.example file to .env? |
export OPENAI_API_KEY="your_api_key" |
can we please close issue this issue as well. |
Why can't my API be called? I'm pretty sure there's no problem with the API
The text was updated successfully, but these errors were encountered: