"Error saving draft" when creating an authenticated action in a GPT

Hello
I’m trying to create a GPT that connects to an API with authentication through a bearer token. When I’m adding the token in the authentication section and click on the save button I have an “error saving draft”.


This error doesn’t happen when I save without the authentication setting. There is no further indication of what the problem might be beside this message. I tried creating a different GPT with the same result. I also tried different mode of authentication, there is the same error. The error is consistent, I tried several times over a few hours with the same result.
Any ideas?
Thanks

12 Likes

Just chiming in to say I get the same error when trying to save a static Bearer token, without any indication of what’s wrong. The “Network” tab in the browser’s dev tools just say “500: Internal Server Error” as well. Hoping it’s just a bug on OpenAI’s side, and that it’ll be fixed soon.

I’m also not allowed to configure OAuth as Authentication method, but the reason there seems to be “missmatching root domains” between the API server url and the auth/token urls. Silly error, imo, as these root domains are different by default when using a 3rd party authentication provider instead of hosting my own.

6 Likes

Yeah same error here everyt ime I add an authentication method I get “Error saving draft”

2 Likes

I was able to save the static Bearer token after my last reply. Can confirm that worked at least. Able to call my API securely with that.

Now they’ll just have to allow configuring OAuth with different root domains, because I can’t update the static token once every hour, of course.

Cool stuff regardles. The potential with these custom GPTs, with a knowledge base, and the ease of communicating with an external API securely, is huge!

2 Likes

That’s great that it works for you!
Unfortunately I still have the same issue. Have you done anything special to make it work?

3 Likes

I’m still getting the ‘Error Saving Draft’ error, unfortunately :frowning: I set the authentication to API Key, Auth Type = Basic and in the API Key field, I pass the token encoded in Base64.

3 Likes

Hah, I may have just been lucky yesterday. Tried again now, and getting the “Error saving draft” again…

Didn’t do anything special, it just allowed me to save the Bearer token without any errors - and as mentioned, the GPT was able to call my API with that token as well.

I guess some instability these early days are to be expected. Looking forward to this working properly!

2 Likes

same issue here, trying to set bearer token with API key while the yaml file has security method in place. looking forward to having a resolution.

1 Like

Hello, same issue for more than 3 days. I hope it will be solved soon

1 Like

Same issue here as well

API Token - Bearer - Classic Github token (I tried the new personal tokens too)

network tab payload (redacted my key)


[
    {
        "type": "dalle"
    },
    {
        "type": "plugins_prototype",
        "metadata": {
            "domain": "api.github.com",
            "json_schema": {
                "openapi": "3.1.0",
                "info": {
                    "title": "OpenAI_Agent_Swarm GitHub repo GraphQL API",
                    "description": "Interact with the OpenAI_Agent_Swarm GitHub repo using GraphQL. Sample query: curl -X POST -H 'Content-Type: application/json' -d '{\"query\": \"query { repository(owner: \\\"daveshap\\\", name: \\\"OpenAI_Agent_Swarm\\\") { issues(first: 10, states: OPEN) { edges { node { title url createdAt } } } } }\"}' https://api.github.com/graphql",
                    "version": "v1.0.0"
                },
                "servers": [
                    {
                        "url": "https://api.github.com"
                    }
                ],
                "paths": {
                    "/graphql": {
                        "post": {
                            "description": "GraphQL endpoint for the OpenAI_Agent_Swarm GitHub repo.",
                            "operationId": "graphqlEndpoint_v3",
                            "requestBody": {
                                "description": "GraphQL query in a stringified JSON format",
                                "required": true,
                                "content": {
                                    "application/json": {
                                        "schema": {
                                            "type": "object",
                                            "properties": {
                                                "query": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "query"
                                            ]
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "components": {
                    "schemas": {
                        "Error": {
                            "type": "object",
                            "properties": {
                                "message": {
                                    "type": "string"
                                }
                            }
                        }
                    }
                }
            },
            "raw_spec": "{\n  \"openapi\": \"3.1.0\",\n  \"info\": {\n    \"title\": \"OpenAI_Agent_Swarm GitHub repo GraphQL API\",\n    \"description\": \"Interact with the OpenAI_Agent_Swarm GitHub repo using GraphQL. Sample query: curl -X POST -H 'Content-Type: application/json' -d '{\\\"query\\\": \\\"query { repository(owner: \\\\\\\"daveshap\\\\\\\", name: \\\\\\\"OpenAI_Agent_Swarm\\\\\\\") { issues(first: 10, states: OPEN) { edges { node { title url createdAt } } } } }\\\"}' https://api.github.com/graphql\",\n    \"version\": \"v1.0.0\"\n  },\n  \"servers\": [\n    {\n      \"url\": \"https://api.github.com\"\n    }\n  ],\n  \"paths\": {\n    \"/graphql\": {\n      \"post\": {\n        \"description\": \"GraphQL endpoint for the OpenAI_Agent_Swarm GitHub repo.\",\n        \"operationId\": \"graphqlEndpoint_v3\",\n        \"requestBody\": {\n          \"description\": \"GraphQL query in a stringified JSON format\",\n          \"required\": true,\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"type\": \"object\",\n                \"properties\": {\n                  \"query\": {\n                    \"type\": \"string\"\n                  }\n                },\n                \"required\": [\n                  \"query\"\n                ]\n              }\n            }\n          }\n        }\n      }\n    }\n  },\n  \"components\": {\n    \"schemas\": {\n      \"Error\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"message\": {\n            \"type\": \"string\"\n          }\n        }\n      }\n    }\n  }\n}",
            "action_id": "g-7e8ff5bccf43875ef77ebad901fe38742621b79b",
            "api_key": "API KEY REDACTED - CLASSIC / PERSONAL TOKENS TRIED",
            "auth": {
                "type": "service_http",
                "authorization_type": "bearer",
                "custom_auth_header": ""
            },
            "privacy_policy_url": "https://docs.github.com/en/site-policy/privacy-policies/github-privacy-statement"
        }
    },
    {
        "type": "browser"
    }
]```
1 Like

I am also seeing the same issue. Error Saving Draft whenever I try to put in an API Key. Please fix this soon, eager to get started with integrating some of the authenticated endpoints!

2 Likes

I have the same issue, playing around with APIs works fine but as soon as I setup an authentication (mine is bearer token), I get “Error saving draft”

1 Like

same here, setting ANY basic API key

1 Like

Seems that this is a general error, I tried with other auth methods but any of them works.

Please OpenAI support, your help.

when hooking GPTs up to zapier I get a link to click when it tries to hit zapier via the actions, but clicking the button link just gives oauth_redirect 500 - pretty much the same issue but from a different angle. OpenAI broke it

Getting the same issue here when trying to use OAUTH for my GPT

Same here, I am not able to save with any kind of API key, I made sure my backend would work with any of their cases, but no success.

I’m having the same issue. “Error saving draft” when trying to add API key (Bearer token). Have you succesfully resolve this? Is it some kind of outage?

2 Likes

Same problem here (with all auth methods) :cry:

Changing the network type from WiFi to a mobile network on my phone resolved the problem for me. I found this solution in a different topic on this forum. I cannot paste the link because it is not permitted.

Title of topic: “Internal Server Error” trying to get oauth to work with new actions

1 Like