Has anyone got ChatGPT plugin to work with OAuth? How have you done that?

I’m stuck with OAuth in my ChatGPT plugin.

It’s all fine until I try to add OAuth to my manifest file. I get “Couldn’t find manifest” after I add the OAuth details.

The steps that I do:

  1. I created the plugin. It works fine at this point.
  2. Then implemented OAuth and added some properties like this:
"auth": {
    "type": "oauth",
    "scope": "",
    "client_url": "PLUGIN_HOSTNAME/authorize",
    "authorization_url": "PLUGIN_HOSTNAME/token",
    "authorization_content_type": "application/json"
  },

PLUGIN_HOSTNAME is of course replaced with the plugin hostname.

  1. I get “couldn’t find manifest” error despite the fact that I can see in logs that there is request to my manifest file with response 200 (suggesting that everything is all right), when I press the button in “Develop your own plugin” in ChatGPT.

If you have successfully connected ChatGPT plugin with OAuth implementation, could you share your steps? Could you also share your manifest file (before you have received the verification code)?

Are you rolling your own auth?

If you’re getting a “can’t find manifest” error when trying to register the plugin, it isn’t recognizing it as a manifest.

Is it being served as a static file within /.well-known?

I use a library to implement OAuth on my side.

"If you’re getting a “can’t find manifest” error when trying to register the plugin, it isn’t recognizing it as a manifest.

Is it being served as a static file within /.well-known?"

I think the error is misleading because if I remove the “auth” part, then it works (but it doesn’t have OAuth). Yes, the file is in the right place.

Hmm I don’t know why it wouldn’t recognize the manifest then. It doesn’t look like your file structure match openai’s requirements though.

auth": {
“type”: “oauth”,
“client_url”: “PLUGIN_HOSTNAME/oauth”,
“scope”: “”,
“authorization_url”: “PLUGIN_HOSTNAME/auth/oauth_exchange”,
“authorization_content_type”: “application/json”,
“verification_tokens”: {
“openai”: “Replace_this_string_with_the_verification_token_generated_in_the_ChatGPT_UI”
}
},

1 Like

Because verification_tokens is added later from what I understand, after you receive it.

Has anyone got ChatGPT plugin to work with OAuth?

Yes, all plugins on the Plugin Store are using this.

It sounds like an error validating the manifest file. i.e. You have some invalid/missing fields. If you paste your full manifest file it will be easier to check. I can’t see anything that’s obviously wrong from what you shared above. Perhaps try with an empty string verification token to see if that helps?

2 Likes

Yes, the empty string verification token has solved the issue. Thanks.

4 Likes

Yep, as shown in the snippet, you have to follow their structure religiously