How do you fix errors when connecting a WordPress plugin to your AI API account?
In short: Connecting is a short handshake: the plugin sends you to Wiozen, you approve, your site gets a one-time code back, and the plugin turns that code into an API key server to server. Errors almost always happen on the way back: the code's 5-minute lifetime runs out, WordPress doesn't recognise your login on return, or the site address isn't https. Wiozen Content Bot handles the login problem itself since version 1.5.10; for the rest, starting the connection again or entering the key by hand is enough.
What does the "Connect account" button actually do?
- The plugin creates a random 32-character state value and a 48-character secret verifier and keeps both in WordPress for 15 minutes.
- It sends you to the approval page on account.wiozen.com. The address carries your site address, the return address, the state value and a SHA-256 digest of the verifier, but not the verifier itself.
- You sign in to Wiozen or create an account. Your email address has to be verified. The page shows your site's name and a Create key and connect button.
- When you approve, the browser goes back to your site with a one-time code. The code is valid for 5 minutes.
- The plugin sends the code and the verifier to api.wiozen.com, gets back an API key starting with
sk-gw-and saves it. The dashboard then shows "Account connected" and your balance.
The key never passes through the address bar. Even if someone grabbed the code from the return address, they couldn't turn it into a key, because the verifier only exists on your site. The key is listed on the Keys page of the API dashboard as WordPress: your-domain.
Why do I get an "Invalid connection request" page?
This page appears on the Wiozen side, before the approval screen. The account site checks the return address before it sends a code there; without that check the approval page could be used to carry the code to someone else's address. The return address has to meet three rules:
- It starts with https. Plain http is only accepted for local addresses such as localhost.
- Its domain is the same as the site address.
- Its path ends in
/wp-admin/admin-post.php.
On real sites two causes stand out. One is a site still running on http. The other is Settings → General in WordPress showing different domains for WordPress Address and Site Address: one with www and one without, or WordPress living on a separate subdomain. The plugin takes the site address from one and the return address from the other, so they don't match. Moving the site to https or putting both addresses on the same domain fixes it. If you can't do that right away, enter the key by hand (below).
A blank WordPress error page after approving
The return address is in the WordPress admin, where you need to be logged in. The login cookie doesn't come back in two cases: your session ended in the meantime, or the server writes cookies as SameSite=Strict. Browsers don't send a Strict cookie on a redirect coming from another site, and the trip back from Wiozen is exactly that. Up to 1.5.9, WordPress showed an empty error page in this situation.
Since 1.5.10 the plugin catches a return that arrives without a session. It first opens a short in-between page that requests the same address again, this time from your own site, so the cookie is sent. If there's still no session, it takes you to the WordPress login and finishes the connection after you sign in. If you're seeing a blank page, update the plugin to the current version (1.5.11) and start the connection again.
"Connection request not found or expired"
This means the plugin couldn't find the request it stored, or the state value that came back doesn't match it. Three usual causes: you approved more than 15 minutes after pressing the button; you pressed connect in two tabs and finished the approval in the older one (the second click replaces the first one's record); or the same return address was opened again after the connection had already completed. The fix is to press Connect account once and approve within a few minutes.
"Wiozen did not return a key"
Here the plugin found its request but couldn't exchange the code for a key. If the code is older than 5 minutes or has already been used (it's single-use; refreshing the page or going back sends it a second time), api.wiozen.com rejects it. The same message appears when your server can't make outgoing requests to api.wiozen.com; the plugin waits 20 seconds for that call, and some hosts restrict outbound connections. Try once more, and if it happens again, enter the key by hand.
How do I enter the key by hand?
- Create a new key on the Keys page of the API dashboard and copy it.
- In the Content Bot, open Enter key manually in the banner at the top, or use the API key field on the Connection and automation tab.
- Paste the key and save. If you save with the field empty, the stored key is kept.
After saving, the banner should show "Account connected" and your balance. If it says "Could not connect account", either the key was copied wrong or your server can't reach the Wiozen API; the second one is the outbound connection problem above.
Does "Disconnect" delete the key too?
Disconnect removes the key from WordPress and stops the scheduled runs. The key itself stays active on your Wiozen account; to shut it off, revoke it on the Keys page of the API dashboard.
Every successful connection creates a new key. If you've connected the same site a few times, you'll see several WordPress: your-domain rows on the Keys page. The site uses the newest one, so revoking the older ones is safe. If you suspect a key got into someone else's hands, follow the steps in the leaked key guide.
Frequently asked questions
Do I need a Wiozen account to connect?
Yes, but it's not a separate step. If you don't have one, you create it in the same flow from the approval page; the approval screen appears once your email address is verified.
How long is the connection code valid?
The code Wiozen hands to your site lasts 5 minutes and works once. The connection request the plugin stores lives for 15 minutes.
My site runs on http. Can I connect?
One-click connection needs an https return address. On an http site you can create the key in the API dashboard and enter it by hand.
Why does a blank error page appear?
Because the WordPress login cookie didn't come back on return, usually because the session ended or cookies are written as SameSite=Strict. Plugin version 1.5.10 and later handle this on their own.
What happens to the old key if I reconnect the site?
It stays active. Every connection creates a new key; revoke the old ones on the Keys page of the API dashboard.
If you haven't installed the plugin yet, download it from the product page; the rest of the setup is in the auto-publishing guide.
More guides: How can you use an AI API from Turkey without a credit card? · How do you connect an OpenAI-compatible API to a tool you already use? · How do you calculate the cost of an AI API? · What should I do if my AI API key has leaked? · How do you generate images with an AI API, and what does one image cost? · Why does my AI API return a 429 error, and how do I fix it? · Why do long AI API requests time out: streaming or non-streaming? · Anthropic Messages API or OpenAI Chat Completions: which one should I use? · What is a context window, and what is a 1 million token context good for? · Which AI model should I choose: deciding by price, context and quality · Why does a reasoning model return an empty answer, and why are thinking tokens charged? · Why is my API balance running out faster than expected? Tracking spend request by request · How do you convert a web page to Markdown to feed it to an AI model? · How do you get AI to write and publish articles in WordPress automatically? · How do you find blog topics from RSS feeds and Google Trends? · Does AI-written content show up on Google and in AI answers? · How do you get internal links into AI-written WordPress articles? · How do you get AI to generate a different featured image for every WordPress post? · How do you write a content brief when an AI writes your blog posts? · What should you watch for when an AI writes recipes for your food blog? · Why does my AI article bot stop halfway in WordPress? "Run is stuck" and LiteSpeed · Why are my scheduled WordPress posts late? WP-Cron and a real server cron · How do I get an AI article bot to write blog posts in English or another language? · What does "Content Bot cannot generate articles" mean? Reading the bot's log