WebberZone ChatGPT Account
Use your ChatGPT subscription for text and image generation in the WordPress AI Client, instead of an OpenAI API key.
by WebberZone · github.com/webberzone/webberzone-chatgpt-account · website
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/webberzone/webberzone-chatgpt-account/archive/refs/heads/master.zipRequires: WordPress 7.0, PHP 7.4, AI Provider for OpenAI License: GPL-2.0+
[!WARNING] This plugin signs in with the public OAuth client of OpenAI's Codex CLI and calls the undocumented ChatGPT backend that Codex uses. It is not an official OpenAI integration. OpenAI may change or block it at any time, and using a ChatGPT subscription outside OpenAI's own apps may conflict with OpenAI's Terms of Use and put your ChatGPT account at risk. Anyone with admin access to the site can use your ChatGPT plan while you are signed in.
Overview
WebberZone ChatGPT Account adds a ChatGPT Account provider to the WordPress AI Client. You sign in with your ChatGPT account using a one-time device code, and text and image generation run against your ChatGPT plan instead of an OpenAI API key.
- Sign in from Settings → Connectors: the provider replaces core's API-key field with a "Sign in with ChatGPT" card and modal. Settings → ChatGPT Account offers the same flow.
- Device-code flow: the same flow as
codex login --device-auth. Everything runs in wp-admin; no CLI helper and no public REST endpoint. - Text generation: streams from
chatgpt.com/backend-api/codex/responses, reusing the AI Provider for OpenAI's message and response mapping. - Image generation: GPT Image 2 via
chatgpt.com/backend-api/codex/images/generations. - Tokens: encrypted with libsodium using a key derived from the site's auth salt, refreshed automatically under a lock (refresh tokens rotate).
- No build step: hand-written ES module for the Connectors card.
Not supported: embeddings, text-to-speech and image editing.
Filters
| Filter | Purpose |
|---|---|
wzcga_codex_client_version |
Codex CLI version reported to the backend; it gates which models are listed. |
wzcga_fallback_models |
Text models offered when the live model list can't be fetched. |
Shared files
This plugin and its sibling (WebberZone Grok Account) share their sign-in, token and Connectors code. These files are identical in both repos apart from the namespace (ChatGPT_Account / Grok_Account), prefix (wzcga / wzgka, WZCGA / WZGKA) and text domain (webberzone-chatgpt-account / webberzone-grok-account):
includes/class-oauth-client.php— refresh with locking, pending device codes, HTTP helpersincludes/class-token-store.php— encrypted token storageincludes/class-admin.php— settings page and AJAX endpointsincludes/class-connectors.php— Settings → Connectors integrationincludes/class-availability.phpassets/js/connectors.js— Connectors card and sign-in modaluninstall.php
Provider-specific wording lives in includes/class-config.php; the device-code flow and refresh request live in includes/class-oauth.php. Change a shared file in one repo, apply the same rename to copy it to the other, and keep them in step.
Contributing
- Fork the repository and create your branch from
master. - Run
composer test(phpcs, PHP compatibility, phpstan) before opening a pull request. composer zipbuilds the installable zip intobuild/.
For Users
See readme.txt for installation and usage instructions.
Changelog
See releases.
License
GPL v2 or later.