Issue with GPTs Custom Action: API Key Authentication Settings Not Saving


I’m encountering a persistent issue with setting up a custom action in my GPTs, specifically integrating Relevance AI’s service. I’ve followed the proper steps to create the action by importing the schema from the third-party service provider, Relevance AI. However, the problem arises when configuring the authentication settings.

Here’s what I’ve done:

  1. Set the ‘Authentication Type’ to “API Key”.
  2. Entered my Relevance AI API key.
  3. Set ‘Auth Type’ to “Custom”.
  4. In the ‘Custom Header Name’ field, input “Authorization”.

After these steps, I click “Save” to finalize the settings. However, the action does not seem to function as expected.
The GPT action receives this response:

“response_data”: {
“message”: “Authorization header must be in format :api_key, or project:api_key, or project:api_key:region, or project:api_key:region:firebaseid”
“status_code”: 401,
“action_id”: “g-e1da789d6cb119797fe51cca2c813930d6b4d2d0”

Upon revisiting the authentication settings of this GPTs action, I noticed that the ‘API Key’ field is empty, indicating that the key isn’t being saved despite pressing the save button.

This issue seems to be a bug or a glitch in the system, as the key should be retained after saving. Has anyone else experienced this problem with custom actions in GPTs, particularly when integrating services using an API key? Any insights or solutions would be greatly appreciated.

Thank you in advance for your help and suggestions!

1 Like

This happens as well with client ID and client secret using OAuth2 ( showing rather than “************” to indicate something was persisted).

However, my OAuth2 works as advertised nonetheless.

So in my case, I think it’s a UX construct (not one I would have chosen) vs an actual bug ??

I had a similar problem with Auth-Type custom and X-Api-Key as the header name. For me the solution was to remove the header parameter from the OpenAPI scheme. With it present, the GPT alway came up with an API-Key itself and overwrote the correct one. I am pretty sure I read somewhere that the Authentication method is then used for every POST request by default.
Dang it, I had the exact same realization some weeks ago and now struggled with again for an hour. My issue is different. When I insert the API key for authentication in the settings of the custom GPT’s action, it is not saved. Therefore, the action, which specifically attempts to use tools from RelevanceAI, returns this error due to not having a valid key, as it is not stored in the settings:
“response_data”: {
“message”: “Authorization header must be in format: api_key, or project:api_key, or project:api_key:region, or project:api_key:region:firebaseid”
“status_code”: 401,
“action_id”: “g-23dc205330ba9c35a20f68e4a6feed39edc0636e”
In my case, it’s not related to the custom Auth-Type and X-Api-Key as the header name because the API key is not stored even after changing it.

I’m sorry I did not mention that I also thought the issue would be with saving the API key, since it looks exactly like on your screenshots for me (It only says , even after successfully saving the key) Therefore I thought it might be a similar case where the UI suggests its an issue with saving while its something else.

Just FYI, the Relevance AI API is expecting your Authorization header to be formatted as Authorization: Token <your_token>. You didn’t say in your post, but have you tried saving the string Token <your_token> as the API key instead of <your_token>?

I ask because other users are reporting that the API key field doesn’t save your API key (and nor should it if it’s secure; OpenAI will hash it first), and the error you’re getting back from Relevance AI makes it sound like they’re picking up an Authorization header, just not a valid one.

Hi @Lucadocet - In case you see this message, did you get this eventually resolved and if so, how? Thank you!


Following this thread. Did you got to solve it?

1 Like

Same problem here: The API key is not being saved.