GPT Action not using API-Key

Hello everyone!

I want to call an API via a URL and get keyword information. To do this, I have set up an Action and provided a corresponding schema and the API key.

The API is called via a URL. Example:


As you can see, authentication is carried out via a URL parameter.

I have set the authentication type to “API key” and the authentication type to “Basic”.

The Action always gives me the message “not successful due to an authorization problem, indicated by a “403 Permission Denied” error”.

In my opinion, the action does not enter the API key, but a dummy text in the call URL.

Is there any idea how I can get Chat GPT to use the API key I specified?

Welcome to the community @Pansenschim

Is the API belonging to a 3rd party or to the creator of the action?

1 Like

Hello, Sukhman!
Thank you for your quick response to my question.

The API key is provided by a third party. I want to access their API service, so I have set up a new action. I have specified the API key (which I received from the API-operator (3rd party)) via the credentials field in the GPT action.

All the best

1 Like

I just tried this on my end using the NASA API which uses the API key basic auth, and it worked flawlessly.

Can you confirm that the 3rd party API is functioning properly?

Hello, Sukhman,

thank you very much for your answer!

The NASA API - that I find very interesting by the way, thanks for the tip - works perfectly.

What I did (NASA API)

  1. I obtained an API key

  2. I fetched the URL for the “image of the day”

  3. I copied a demo API response

  4. In ChatGPT I requested a JSON schema for the given URL and demo-response

  5. I created a new GPT and entered JSON and the API key

→ Works!

I tried the exact same thing in my “Keyword API GPT”.

  1. schema (URL and sample data from a response)

  2. entered the API key

The GPT is now saying: “To query the search volume for a keyword, please enter the keyword and your API key. Optionally, you can also enter a country for which you would like to receive specific data.”

The API key is completely ignored.

I have added a screenshot of the key configuration.

Screenshot 2024-02-23 110446

1 Like

Hi Sukhman!
I’m pretty sure: my tests with the NASA API were useless. How do I know?

Well: There is a demo API key for the NASA API Picture of the Day. This means you will always get a result if you contact the API via Chat GPT Actions - even when no API-key is provided. The GPT does not use the API key, but a demo API key.

So I get a response even if the GPT does not use the API key I entered. Please also have a look at the screenshot I have attached.

1 Like