How to Migrate ‘Plugins’ Without Authentication
I’ve had multiple failed attempts at migrating from “Plugins” to “Actions,” so I want to share a successful method with you. With “Actions,” the “ai-plugin.json” file has been removed, which means you’ll need to substitute the information that was previously provided by it.
“Plugins” that use OAuth no longer work.
Since “ai-plugin.json” has been removed, the “authorization_content_type” is also gone. The request body sent to the /token endpoint used to be “application/json,” but it has been changed to “application/x-www-form-urlencoded,” causing the plugins to malfunction. We need to address this issue.
Thought it might help to clarify what my own issue is. I attempted to just import the openapi.yaml and that cause an issue until i added that new field. Now it fails to properly use the plugin, even though when in the plugin chats it works perfect each time. As seen below:
I experienced the authorization-content-type mismatch as well.
The ‘normal’ plugin still works. But trying to get it working as an action:
I got 422 validation errors on the token endpoint, which turned out to be caused by not receiving json but formdata. Unsure though what formdata should be accepted / if there still is grant_type = authorization_code or refresh_token etc. Could not find updated docs as well.
@yhavinga@inu-ai are yall suggesting you are able to get some portion of oauth working on GPTs actions? If so how?
Given how you cannot pass in the ai-plugin.json auth content I don’t see how to get it to work. In fact I don’t know how to get any auth to work in actions.
The image is a screenshot from my ChatFeedSync Plugins where I managed to temporarily migrate to Actions.
Here is an excerpt of the modified code:
It involves a method to determine if the “Content-Type” header is “application/json” and change the parsing method accordingly.
This code uses the TypeScript hono library, but I hope the content is clear.
Not currently. I wouldn’t say it’s particularly difficult, the upshot is:
Anything that used to be in ai-plugin.json is configurable through the UI (including authentication; it seems like this was added after this post & the initial release)
You can import your existing schema directly.
Localhost plugins are temporarily disabled, and there seem to be slightly tighter restrictions on what domains you can use (YMMV here, not everything is documented)