Error saying that my API key is wrong although updated

Hello There,
Would love to get help here, thanks !

I changed and deleted my old OpenAI api Key in place for a new one which caused the askchatgpt custom action to stop working. Whenever I run a test request It now displays an error saying that my API key is wrong and showing the old one I deleted. And this despite the fact I have changed the active openai key to a new code.

Hello, please try to create a new custom action and include the new API key. If the issue persists, you can use the “Chat GPT” component in the Marketplace.

Thank you!

1 Like

Thanks for your raid reply @Ali-Bazzi !
In the end I created my onw custom action to connect to Open AI API and using the model they mentionned on their website here

curl https://api.openai.com/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $OPENAI_API_KEY" \
  -d '{
     "model": "gpt-3.5-turbo",
     "messages": [{"role": "user", "content": "Say this is a test!"}],
     "temperature": 0.7
   }'

I was never able to solve the issue using the pre-built Adalo action “Ask Chat GPT”. It seems lots of users have had the same issue, maybe something to debug here ?

Thanks again !

same thing here, openai not working with adalo. same issue. even following the tutorial: https://www.youtube.com/watch?v=NpcDvTgVB0w

My error:

{
  "error": {
    "code": null,
    "message": "You didn't provide an API key. You need to provide your API key in an Authorization header using Bearer auth (i.e. Authorization: Bearer YOUR_KEY), or as the password field (with blank username) if you're accesing the API from your browser and are prompted for a username and password. You can obtain an API key from https://platform.openai.com/account/api-keys.",
    "param": null,
    "type": "invalid_request_error"
  }
}

how to fix it?

hey allinjoe, in fact you need to enter the word bearer before the api key - that’s why it does not work - see below picutre for reference

image

As you can see on the picture I wrote the word Bearer before the API key, and that is what you error message is saying. Does that make sense ?

Hi and thanks, it works. The Problem was as well that i used the name “Auth” and not “Authorization” :slight_smile:

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.