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

**URL:** <https://community.openai.com/t/error-saving-draft-when-creating-an-authenticated-action-in-a-gpt/490733>\
**Category:** Plugins / Actions builders\
**Tags:** gpt\
**Created:** [November 9, 2023, 7:58pm UTC](https://community.openai.com/t/error-saving-draft-when-creating-an-authenticated-action-in-a-gpt/490733 "2023-11-09T19:58:37Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![bpjj](https://avatars.discourse-cdn.com/v4/letter/b/e9bcb4/32.png) [@bpjj](https://community.openai.com/u/bpjj)\
**Post date:** [November 9, 2023, 7:58pm UTC](https://community.openai.com/t/error-saving-draft-when-creating-an-authenticated-action-in-a-gpt/490733/1 "2023-11-09T19:58:37Z")

</div>

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”.

 ![frddedede](https://us1.discourse-cdn.com/openai1/original/3X/5/1/510302f98d1c9bce78c7e9c6ea7c3c848a86743c.png)  
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

---

<div class="post-metadata">

**Author:** ![TheHenrik](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/thehenrik/32/242390_2.png) [@TheHenrik](https://community.openai.com/u/TheHenrik)\
**Post date:** [November 9, 2023, 9:39pm UTC](https://community.openai.com/t/error-saving-draft-when-creating-an-authenticated-action-in-a-gpt/490733/2 "2023-11-09T21:39:39Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![metaxel](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/metaxel/32/146134_2.png) [@metaxel](https://community.openai.com/u/metaxel)\
**Post date:** [November 11, 2023, 7:32am UTC](https://community.openai.com/t/error-saving-draft-when-creating-an-authenticated-action-in-a-gpt/490733/3 "2023-11-11T07:32:48Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![TheHenrik](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/thehenrik/32/242390_2.png) [@TheHenrik](https://community.openai.com/u/TheHenrik)\
**Post date:** [November 11, 2023, 10:19am UTC](https://community.openai.com/t/error-saving-draft-when-creating-an-authenticated-action-in-a-gpt/490733/4 "2023-11-11T10:19:58Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![bpjj](https://avatars.discourse-cdn.com/v4/letter/b/e9bcb4/32.png) [@bpjj](https://community.openai.com/u/bpjj)\
**Post date:** [November 11, 2023, 10:43am UTC](https://community.openai.com/t/error-saving-draft-when-creating-an-authenticated-action-in-a-gpt/490733/5 "2023-11-11T10:43:03Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![leszczynski](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/leszczynski/32/118818_2.png) [@leszczynski](https://community.openai.com/u/leszczynski)\
**Post date:** [November 11, 2023, 10:50am UTC](https://community.openai.com/t/error-saving-draft-when-creating-an-authenticated-action-in-a-gpt/490733/6 "2023-11-11T10:50:24Z")

</div>

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

 ![autherr](https://us1.discourse-cdn.com/openai1/original/3X/f/6/f6672ff5a830e81a8f55c21c5f37e5b97dca4da0.png)

---

<div class="post-metadata">

**Author:** ![TheHenrik](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/thehenrik/32/242390_2.png) [@TheHenrik](https://community.openai.com/u/TheHenrik)\
**Post date:** [November 11, 2023, 11:05am UTC](https://community.openai.com/t/error-saving-draft-when-creating-an-authenticated-action-in-a-gpt/490733/7 "2023-11-11T11:05:04Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![alswl0730](https://avatars.discourse-cdn.com/v4/letter/a/b4bc9f/32.png) [@alswl0730](https://community.openai.com/u/alswl0730)\
**Post date:** [November 13, 2023, 11:01am UTC](https://community.openai.com/t/error-saving-draft-when-creating-an-authenticated-action-in-a-gpt/490733/8 "2023-11-13T11:01:14Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![flolau91](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/flolau91/32/149951_2.png) [@flolau91](https://community.openai.com/u/flolau91)\
**Post date:** [November 13, 2023, 1:49pm UTC](https://community.openai.com/t/error-saving-draft-when-creating-an-authenticated-action-in-a-gpt/490733/9 "2023-11-13T13:49:31Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![GPTForUs](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/gptforus/32/132623_2.png) [@GPTForUs](https://community.openai.com/u/GPTForUs)\
**Post date:** [November 13, 2023, 4:52pm UTC](https://community.openai.com/t/error-saving-draft-when-creating-an-authenticated-action-in-a-gpt/490733/10 "2023-11-13T16:52:22Z")

</div>

Same issue here as well

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

network tab payload (redacted my key)

````auto

[
    {
        "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"
    }
]```
````

---

<div class="post-metadata">

**Author:** ![newms87](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/newms87/32/146927_2.png) [@newms87](https://community.openai.com/u/newms87)\
**Post date:** [November 14, 2023, 3:37am UTC](https://community.openai.com/t/error-saving-draft-when-creating-an-authenticated-action-in-a-gpt/490733/11 "2023-11-14T03:37:46Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![jean.malartic](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/jean.malartic/32/147308_2.png) [@jean.malartic](https://community.openai.com/u/jean.malartic)\
**Post date:** [November 14, 2023, 11:09am UTC](https://community.openai.com/t/error-saving-draft-when-creating-an-authenticated-action-in-a-gpt/490733/13 "2023-11-14T11:09:41Z")

</div>

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”

---

<div class="post-metadata">

**Author:** ![2wan](https://avatars.discourse-cdn.com/v4/letter/2/c2a13f/32.png) [@2wan](https://community.openai.com/u/2wan)\
**Post date:** [November 14, 2023, 12:51pm UTC](https://community.openai.com/t/error-saving-draft-when-creating-an-authenticated-action-in-a-gpt/490733/14 "2023-11-14T12:51:50Z")

</div>

same here, setting ANY basic API key

---

<div class="post-metadata">

**Author:** ![chinassky](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/chinassky/32/250941_2.png) [@chinassky](https://community.openai.com/u/chinassky)\
**Post date:** [November 14, 2023, 3:51pm UTC](https://community.openai.com/t/error-saving-draft-when-creating-an-authenticated-action-in-a-gpt/490733/15 "2023-11-14T15:51:35Z")

</div>

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

Please OpenAI support, your help.

---

<div class="post-metadata">

**Author:** ![GPTForUs](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/gptforus/32/132623_2.png) [@GPTForUs](https://community.openai.com/u/GPTForUs)\
**Post date:** [November 14, 2023, 5:29pm UTC](https://community.openai.com/t/error-saving-draft-when-creating-an-authenticated-action-in-a-gpt/490733/16 "2023-11-14T17:29:26Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![galilai](https://avatars.discourse-cdn.com/v4/letter/g/c5a1d2/32.png) [@galilai](https://community.openai.com/u/galilai)\
**Post date:** [November 14, 2023, 6:01pm UTC](https://community.openai.com/t/error-saving-draft-when-creating-an-authenticated-action-in-a-gpt/490733/17 "2023-11-14T18:01:03Z")

</div>

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

 ![Screenshot 2023-11-14 at 14.56.06](https://us1.discourse-cdn.com/openai1/original/3X/f/a/fa9b1820d94078979cdbf30f751dfd3c4242a0aa.png)

---

<div class="post-metadata">

**Author:** ![arthexis](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/arthexis/32/235484_2.png) [@arthexis](https://community.openai.com/u/arthexis)\
**Post date:** [November 14, 2023, 6:54pm UTC](https://community.openai.com/t/error-saving-draft-when-creating-an-authenticated-action-in-a-gpt/490733/18 "2023-11-14T18:54:20Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![bbscout](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/bbscout/32/146964_2.png) [@bbscout](https://community.openai.com/u/bbscout)\
**Post date:** [November 15, 2023, 6:01am UTC](https://community.openai.com/t/error-saving-draft-when-creating-an-authenticated-action-in-a-gpt/490733/19 "2023-11-15T06:01:43Z")

</div>

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?

 ![image](https://us1.discourse-cdn.com/openai1/original/3X/4/5/45cf483a843138a4ec5985c805830fa67d759239.png)

---

<div class="post-metadata">

**Author:** ![jonathan.sabbah](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/jonathan.sabbah/32/11869_2.png) [@jonathan.sabbah](https://community.openai.com/u/jonathan.sabbah)\
**Post date:** [November 15, 2023, 3:36pm UTC](https://community.openai.com/t/error-saving-draft-when-creating-an-authenticated-action-in-a-gpt/490733/20 "2023-11-15T15:36:01Z")

</div>

Same problem here (with all auth methods) 😢

---

<div class="post-metadata">

**Author:** ![karass32](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/karass32/32/147495_2.png) [@karass32](https://community.openai.com/u/karass32)\
**Post date:** [November 15, 2023, 4:26pm UTC](https://community.openai.com/t/error-saving-draft-when-creating-an-authenticated-action-in-a-gpt/490733/21 "2023-11-15T16:26:14Z")

</div>

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

[Next page](https://community.openai.com/t/error-saving-draft-when-creating-an-authenticated-action-in-a-gpt/490733.md?page=2)
