Guides · Setup

How to Connect the WooCommerce API to AI Agents with Outloop

Last updated:

In short

WooCommerce uses a Consumer Key and Consumer Secret — a different credential from anything in WordPress itself.

You generate dedicated REST API keys in WooCommerce → Settings → Advanced → REST API, tied to a WordPress user and a permission level. Outloop stores them locally in macOS Keychain against the plain site domain, derives the /wp-json REST base, and lets agents work with the store through the API Bridge without ever seeing the Consumer Secret.

Summarize this setup guide with AI ChatGPTClaudePerplexity

What this setup gives you

You will generate one dedicated pair of WooCommerce REST API keys — a Consumer Key and a Consumer Secret — and connect them in Outloop against the plain site domain. After that, AI agents can work with that store through Outloop's secure API Bridge, within whatever the key's permission level, the linked WordPress user's capabilities, the grant, and runtime policy allow. The Consumer Secret never appears to the agent, in chat, logs, repos, or project files.

Security rule. Never record, screenshot, paste, or publish a real Consumer Key, Consumer Secret, or Authorization header. Their only destination is the Outloop Mac app — never Outloop Cloud, the website, chat, docs, or .env files. Every screenshot in this guide was captured before any key was generated, and identifying details are redacted.

What you need before starting

1. This is not the WordPress credential

WooCommerce and WordPress are two separate connectors in Outloop, with two separate credentials. This is the single most common source of confusion, so it is worth being blunt about it:

If you also want agents working with posts, pages and media metadata on the same site, set that up separately in the WordPress setup guide.

Open Settings → Permalinks. WooCommerce needs a human-readable permalink structure — select any option other than Plain. With Plain selected, the WooCommerce REST routes do not resolve and no credential will help.

WordPress Permalink Settings showing the permalink structure options with Plain at the top and readable structures below.
Why it matters. Plain permalinks produce query-string URLs like /?p=123. The REST routes need the path-based rewrite rules that every other option enables. Post name is the usual choice.

3. Open the REST API settings

Go to WooCommerce → Settings → Advanced → REST API and press Add key.

4. Create the API key

Give the key a Description that identifies the integration — Outloop WooCommerce — then choose the User the key should act as.

WooCommerce REST API key details form with the description set to Outloop WooCommerce and a user selected.

WooCommerce's own guidance on that screen is worth following exactly: "Stick to one key per client: this makes it easier to revoke access in the future for a single client, without causing disruption for others." That is the same isolation model Outloop uses per workspace.

Select the intended user deliberately. The key inherits the capabilities of whichever WordPress user you pick, and the selector may default to whoever is signed in. Choose a dedicated user whose role supports your intended workflows rather than accepting the default. Outloop does not artificially reduce what that user, the key's permission level, the grant, and policy already permit.

Set Permissions. Read/Write is the recommended default, because most real store workflows eventually need to change something. Choose Read if the workflow only ever reports on the store. Then press Generate API key.

WooCommerce API key form showing the Permissions dropdown set to Read slash Write above the Generate API key button.
The next screen shows the Consumer Secret once. WooCommerce displays the Consumer Key and Consumer Secret a single time, immediately after generation. Copy them straight into Outloop and close the screen. Do not screenshot them, paste them into chat or a document, or save them to a file — if you lose the secret, revoke the key and generate a new one. That is why this guide has no screenshot of the generated values.

Afterwards the key list shows only the last characters of the Consumer Key, the permission level, and when it was last used. The secret is never shown again.

WooCommerce REST API key list showing a key with Read slash Write permissions and its last access time, with identifying values redacted.

5. Add WooCommerce in Outloop

In Outloop, open API Keys, confirm the workspace this client belongs to, and choose WooCommerce.

The connector then appears under that workspace, alongside WordPress if you have connected it — separately, with its own credential:

Outloop Connected Services list showing WooCommerce and WordPress as separate dedicated connectors, both connected.

6. Discovery is not proof

Outloop's first step reads the site's public REST index to confirm the address and detect WooCommerce — explicitly with no credential used for that step. There are four distinct states, and only the last two involve your credential:

The WooCommerce API index needs no authentication. A GET of /wp-json/wc/v3 returns HTTP 200 to anyone — it is the documented way to check connectivity without credentials. It is the single most likely thing to be mistaken for a successful connection. Prove with an authenticated store read instead.

7. Authenticated proof

In Outloop's activity log, both states are visible for an already-connected WooCommerce connector. Grant preflight → PREFLIGHT_OK answers "is this grant live?" from policy, with no provider call. api_bridge.request → OK is the real authenticated request:

service: woocommerce
verb: api_bridge.request
decision / code: allow / OK
secret_exposed: false
runtime-verified: yes
Outloop live activity log showing grant preflight and authenticated api bridge requests for WooCommerce and WordPress, with identifiers redacted.

The connector card then shows the verified state — runtime verified through the API bridge, the approved methods, the access tier, and Secret exposed: false:

Outloop WooCommerce connector card showing runtime verified status, allowed methods, full API access and secret exposed false.

What the agent never sees

Access tier and methods

The verified grant shows Full API access as the default tier, with these methods approved:

GET, HEAD, OPTIONS, POST, PUT, PATCH, DELETE

High-risk operations are acknowledged before enabling and are always audited. If a workflow only needs reporting, you can restrict the connector to read-only at any time from its card in Outloop, and raise it again later. Note that the key's own WooCommerce permission level and the linked user's capabilities still apply — the effective ceiling is the narrowest of them.

Media upload is not supported by this connector yet. File and media upload has no supported upload profile here, so this guide makes no promise that agents can upload product images through it.

Verified vs not claimed yet

Rotate or revoke safely

Troubleshooting

Work through these in order — the most likely and least invasive checks come first.

Permalinks are set to Plain

Check this first, because it breaks everything downstream and takes seconds to fix. Settings → Permalinks → select any option other than Plain, then save.

The Consumer Key and Consumer Secret are swapped

Easy to do, and it presents as a plain authentication failure. Over HTTPS the Consumer Key is the username and the Consumer Secret is the password. Re-enter them in the right fields in Outloop.

Wrong site or base URL

Enter the plain HTTPS site domain in Outloop, not an API path. Outloop derives /wp-json itself, so typing the path as well produces a malformed base.

The key is tied to the wrong WordPress user

The key inherits that user's capabilities, so a key created against an under-privileged user will fail on operations the workflow needs even with Read/Write selected. Check the User column in the key list and generate a new key against the intended user if it is wrong.

Read permission on a workflow that writes

A key created with Read cannot write, regardless of Outloop's access tier. Generate a new key with Read/Write, update Outloop, then revoke the old one.

The key was revoked or rotated

If the key was revoked in WooCommerce, Outloop still holds a credential that no longer authenticates. Generate a new key and update it in Outloop.

HTTP 401 versus HTTP 403

WooCommerce documents 401 as an authentication or permission failure — for example incorrect keys. A 403 more often points at a server, security plugin, or firewall layer rejecting the request before WooCommerce sees it. Treat 401 as a credential question and 403 as an infrastructure question.

A security or cache layer is interfering

Caching and firewall layers can intercept REST requests or serve stale responses. Exclude the REST routes from caching, and ask whoever manages the site to allow them through the firewall. Do not delete the security plugin.

The Authorization header is stripped

Some servers fail to pass the Authorization header through to PHP, which looks exactly like an invalid key. This is a hosting and server configuration issue: ask your host to forward the Authorization header correctly.

Never put credentials in a URL. WooCommerce documents a query-string fallback for this situation. Do not use it. Credentials in URLs end up in server logs, browser history, proxies, and analytics — turning a configuration problem into a credential leak. Fix the header forwarding instead.

I connected WooCommerce but WordPress still does not work

Expected. They are separate connectors with separate credentials. Set WordPress up separately in the WordPress setup guide.

Public Store API access mistaken for authenticated proof

WooCommerce exposes public endpoints, and the API index itself needs no authentication. A 200 from those says nothing about your credential. Prove with an authenticated store read.

The connector saved but I do not see it

Confirm you are looking at the same workspace you selected in the connector form. WooCommerce is workspace-dedicated, so it appears under that one workspace only.

Official documentation

Outloop is available with guided onboarding for agency teams. Outloop is an independent tool and is not affiliated with or endorsed by WooCommerce, Automattic, or WordPress. See the security model, the WordPress setup guide, or the Custom API Bridge guide.

Summarize this setup guide with AI ChatGPTClaudePerplexity

Once the authenticated proof passes, your agents can work with the store through Outloop — without ever seeing the Consumer Secret.

Outloop is available with guided onboarding for AI agencies, operators, and dev shops.

Frequently Asked Questions

WooCommerce API + Outloop — FAQ